mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 18:01:02 +00:00
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
|
||||
// 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)
|
||||
|
|
Loading…
Reference in a new issue