mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-23 02:29:43 +08:00
Fix MySQL and PostgreSQL column drop SQL (#3649)
This commit is contained in:
parent
1a83581121
commit
de8a091767
|
@ -233,7 +233,7 @@ func dropTableColumns(x *xorm.Engine, tableName string, columnNames ...string) (
|
|||
}
|
||||
cols += "DROP COLUMN `" + col + "`"
|
||||
}
|
||||
if _, err := x.Exec(fmt.Sprintf("ALTER TABLE `%s` %s", tableName, columnNames)); err != nil {
|
||||
if _, err := x.Exec(fmt.Sprintf("ALTER TABLE `%s` %s", tableName, cols)); err != nil {
|
||||
return fmt.Errorf("Drop table `%s` columns %v: %v", tableName, columnNames, err)
|
||||
}
|
||||
case setting.UseMSSQL:
|
||||
|
|
Loading…
Reference in New Issue
Block a user