mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-16 04:13:12 +00:00
fix: migrator base path
This commit is contained in:
parent
baa3378ff7
commit
220cabfb5b
@ -61,7 +61,7 @@ func (s *Store) Migrate(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if common.IsVersionGreaterThan(schemaVersion, latestMigrationHistoryVersion) {
|
if common.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")
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ func (s *Store) normalizedMigrationHistoryList(ctx context.Context) error {
|
|||||||
latestMinorVersion := common.GetMinorVersion(latestVersion)
|
latestMinorVersion := common.GetMinorVersion(latestVersion)
|
||||||
|
|
||||||
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")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user