diff --git a/server/store/datastore/migration/common.go b/server/store/datastore/migration/common.go index 6391844aa..1e5f28a49 100644 --- a/server/store/datastore/migration/common.go +++ b/server/store/datastore/migration/common.go @@ -215,10 +215,7 @@ func dropTableColumns(sess *xorm.Session, tableName string, columnNames ...strin func alterColumnDefault(sess *xorm.Session, table, column, defValue string) error { dialect := sess.Engine().Dialect().URI().DBType switch dialect { - case schemas.MYSQL: - _, err := sess.Exec(fmt.Sprintf("ALTER TABLE `%s` COLUMN `%s` SET DEFAULT %s;", table, column, defValue)) - return err - case schemas.POSTGRES: + case schemas.MYSQL, schemas.POSTGRES: _, err := sess.Exec(fmt.Sprintf("ALTER TABLE `%s` ALTER COLUMN `%s` SET DEFAULT %s;", table, column, defValue)) return err case schemas.SQLITE: