Ignore count of applied migrations from migrate.Exec master
authorJan Dittberner <jan@dittberner.info>
Sat, 31 Mar 2018 08:50:31 +0000 (10:50 +0200)
committerJan Dittberner <jan@dittberner.info>
Sat, 31 Mar 2018 08:50:31 +0000 (10:50 +0200)
models.go

index eeb49fc..8c2f968 100644 (file)
--- a/models.go
+++ b/models.go
@@ -259,11 +259,9 @@ func NewDB(database *sql.DB) *dbHandler {
                log.Panicf("%d statements failed to prepare", len(failedStatements))
        }
 
-       version, err :=  migrate.Exec(database, "sqlite3", dbmig.Migrations(), migrate.Up)
+       _, err := migrate.Exec(database, "sqlite3", dbmig.Migrations(), migrate.Up)
        if err != nil {
                log.Panicf("running database migration failed: %v", err)
-       } else {
-               log.Infof("database is now at version %d", version)
        }
        return handler
 }