diff --git a/store/db/db.go b/store/db/db.go index f88dc1b057935..ce7a6af6caf77 100644 --- a/store/db/db.go +++ b/store/db/db.go @@ -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