Skip to content

Commit a79af9c

Browse files
Morlinestlafriks
authored andcommitted
Fix index column deletion (#2651)
1 parent 4b2c8ca commit a79af9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/migrations/v45.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func removeIndexColumnFromRepoUnitTable(x *xorm.Engine) (err error) {
1717
case setting.UseSQLite3:
1818
log.Warn("Unable to drop columns in SQLite")
1919
case setting.UseMySQL, setting.UsePostgreSQL, setting.UseMSSQL, setting.UseTiDB:
20-
if _, err := x.Exec("ALTER TABLE repo_unit DROP COLUMN index"); err != nil {
20+
if _, err := x.Exec("ALTER TABLE repo_unit DROP COLUMN `index`"); err != nil {
2121
return fmt.Errorf("DROP COLUMN index: %v", err)
2222
}
2323
default:

0 commit comments

Comments
 (0)