fix: compare migration_history

This commit is contained in:
boojack 2022-07-01 20:35:36 +08:00
parent 5a1ea00943
commit 565fe0cc56
1 changed files with 5 additions and 5 deletions

View File

@ -75,15 +75,15 @@ func (db *DB) Open() (err error) {
}
}
return err
}
func (db *DB) migrate() error {
err := db.compareMigrationHistory()
err = db.compareMigrationHistory()
if err != nil {
return fmt.Errorf("failed to compare migration history, err=%w", err)
}
return err
}
func (db *DB) migrate() error {
filenames, err := fs.Glob(migrationFS, fmt.Sprintf("%s/*.sql", "migration"))
if err != nil {
return err