mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: base path of migrator
This commit is contained in:
@@ -59,7 +59,7 @@ func (s *Store) Migrate(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if version.IsVersionGreaterThan(schemaVersion, latestMigrationHistoryVersion) {
|
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 {
|
if err != nil {
|
||||||
return errors.Wrap(err, "failed to read migration files")
|
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{}
|
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 {
|
if err != nil {
|
||||||
return errors.Wrap(err, "failed to read migration files")
|
return errors.Wrap(err, "failed to read migration files")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user