Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: base path of migrator

Steven615aa9479325
diff --git a/store/migrator.go b/store/migrator.go
index 166261fa4..34a8b8c09 100644
--- a/store/migrator.go
+++ b/store/migrator.go
@@ -59,7 +59,7 @@ func (s *Store) Migrate(ctx context.Context) error {
}
if version.IsVersionGreaterThan(schemaVersion, latestMigrationHistoryVersion) {
- filePaths, err := fs.Glob(migrationFS, fmt.Sprintf("%s/*/*.sql", s.getMigrationBasePath()))
+ filePaths, err := fs.Glob(migrationFS, fmt.Sprintf("%s*/*.sql", s.getMigrationBasePath()))
if err != nil {
return errors.Wrap(err, "failed to read migration files")
}
@@ -263,7 +263,7 @@ func (s *Store) normalizedMigrationHistoryList(ctx context.Context) error {
}
schemaVersionMap := map[string]string{}
- filePaths, err := fs.Glob(migrationFS, fmt.Sprintf("%s/*/*.sql", s.getMigrationBasePath()))
+ filePaths, err := fs.Glob(migrationFS, fmt.Sprintf("%s*/*.sql", s.getMigrationBasePath()))
if err != nil {
return errors.Wrap(err, "failed to read migration files")
}