summaryrefslogtreecommitdiffstats
path: root/models/migrations/v45.go
diff options
context:
space:
mode:
authorMorlinest <Morlinest@users.noreply.github.com>2017-10-04 13:26:13 +0200
committerLauris BH <lauris@nix.lv>2017-10-04 14:26:13 +0300
commita79af9cf6f6828c87e6e5636fff9e9d85bce386f (patch)
treefefbd5cca037afa7f2250073f4c73361f8493ce1 /models/migrations/v45.go
parent4b2c8ca533ee06bac72fed040a2e2412cc122954 (diff)
downloadgitea-a79af9cf6f6828c87e6e5636fff9e9d85bce386f.tar.gz
gitea-a79af9cf6f6828c87e6e5636fff9e9d85bce386f.zip
Fix index column deletion (#2651)
Diffstat (limited to 'models/migrations/v45.go')
-rw-r--r--models/migrations/v45.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/migrations/v45.go b/models/migrations/v45.go
index ea3c024325..7a85908195 100644
--- a/models/migrations/v45.go
+++ b/models/migrations/v45.go
@@ -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: