update migration
This commit is contained in:
parent
dd6540692b
commit
860c611a37
1 changed files with 3 additions and 3 deletions
|
@ -19,11 +19,11 @@ const (
|
||||||
// Migrate performs the database migration. If the migration fails
|
// Migrate performs the database migration. If the migration fails
|
||||||
// and error is returned.
|
// and error is returned.
|
||||||
func Migrate(driver string, db *sql.DB) error {
|
func Migrate(driver string, db *sql.DB) error {
|
||||||
|
if err := checkPriorMigration(db); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
switch driver {
|
switch driver {
|
||||||
case DriverMysql:
|
case DriverMysql:
|
||||||
if err := checkPriorMigration(db); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return mysql.Migrate(db)
|
return mysql.Migrate(db)
|
||||||
case DriverPostgres:
|
case DriverPostgres:
|
||||||
return postgres.Migrate(db)
|
return postgres.Migrate(db)
|
||||||
|
|
Loading…
Reference in a new issue