From 860c611a37f0812e60e3f01beadbefb84e391c5d Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Thu, 1 Jun 2017 14:30:49 +0200 Subject: [PATCH] update migration --- store/datastore/ddl/migrate.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/store/datastore/ddl/migrate.go b/store/datastore/ddl/migrate.go index 0002d00c..df07a273 100644 --- a/store/datastore/ddl/migrate.go +++ b/store/datastore/ddl/migrate.go @@ -19,11 +19,11 @@ const ( // Migrate performs the database migration. If the migration fails // and error is returned. func Migrate(driver string, db *sql.DB) error { + if err := checkPriorMigration(db); err != nil { + return err + } switch driver { case DriverMysql: - if err := checkPriorMigration(db); err != nil { - return err - } return mysql.Migrate(db) case DriverPostgres: return postgres.Migrate(db)