Browse Source

Fix index column deletion (#2651)

tags/v1.3.0-rc1
Morlinest Lauris BH 7 years ago
parent
commit
309612767a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/migrations/v45.go

+ 1
- 1
models/migrations/v45.go View File

@@ -17,7 +17,7 @@ func removeIndexColumnFromRepoUnitTable(x *xorm.Engine) (err error) {
case setting.UseSQLite3: case setting.UseSQLite3:
log.Warn("Unable to drop columns in SQLite") log.Warn("Unable to drop columns in SQLite")
case setting.UseMySQL, setting.UsePostgreSQL, setting.UseMSSQL, setting.UseTiDB: 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) return fmt.Errorf("DROP COLUMN index: %v", err)
} }
default: default:


Loading…
Cancel
Save