Browse Source

Fix index column deletion (#2651)

Morlinest 2 years ago
parent
commit
a79af9cf6f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/migrations/v45.go

+ 1 - 1
models/migrations/v45.go

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