mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20: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
|
// 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