0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 16:16:35 -05:00

Fix index column deletion (#2651)

This commit is contained in:
Morlinest 2017-10-04 13:26:13 +02:00 committed by Lauris BH
parent 4b2c8ca533
commit a79af9cf6f

View file

@ -17,7 +17,7 @@ func removeIndexColumnFromRepoUnitTable(x *xorm.Engine) (err error) {
case setting.UseSQLite3:
log.Warn("Unable to drop columns in SQLite")
case setting.UseMySQL, setting.UsePostgreSQL, setting.UseMSSQL, setting.UseTiDB:
if _, err := x.Exec("ALTER TABLE repo_unit DROP COLUMN index"); err != nil {
if _, err := x.Exec("ALTER TABLE repo_unit DROP COLUMN `index`"); err != nil {
return fmt.Errorf("DROP COLUMN index: %v", err)
}
default: