Commit 7716d4bc authored by ale's avatar ale

Do not panic on migrate.ErrNoChange

The 'migrate' package returns an error if no migrations were applied
because the database was already in the target state. Catch that and
continue execution normally.
parent d9bf5e40
Pipeline #693 passed with stages
in 1 minute and 26 seconds
......@@ -61,7 +61,10 @@ func runDatabaseMigrations(db *sql.DB) error {
m.Log = &migrateLogger{}
log.Printf("running database migrations")
return m.Up()
if err := m.Up(); err != nil && err != migrate.ErrNoChange {
return err
return nil
type statementMap map[string]*sql.Stmt
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment