update migration

This commit is contained in:
Brad Rydzewski 2017-06-01 14:30:49 +02:00
parent dd6540692b
commit 860c611a37

View file

@ -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)