diff options
author | Lauris BH <lauris@nix.lv> | 2018-03-09 03:20:57 +0200 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2018-03-09 09:20:57 +0800 |
commit | de8a091767eff6eecfcd2a630441ddaccb271303 (patch) | |
tree | 3d6577507b6f2d9dff4a0d62ca395f6fc316277e /models | |
parent | 1a83581121a80c8deb8160e2d04905ab71768be3 (diff) | |
download | gitea-de8a091767eff6eecfcd2a630441ddaccb271303.tar.gz gitea-de8a091767eff6eecfcd2a630441ddaccb271303.zip |
Fix MySQL and PostgreSQL column drop SQL (#3649)
Diffstat (limited to 'models')
-rw-r--r-- | models/migrations/migrations.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index e7f3dae646..cc40bd8272 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -233,7 +233,7 @@ func dropTableColumns(x *xorm.Engine, tableName string, columnNames ...string) ( } cols += "DROP COLUMN `" + col + "`" } - if _, err := x.Exec(fmt.Sprintf("ALTER TABLE `%s` %s", tableName, columnNames)); err != nil { + if _, err := x.Exec(fmt.Sprintf("ALTER TABLE `%s` %s", tableName, cols)); err != nil { return fmt.Errorf("Drop table `%s` columns %v: %v", tableName, columnNames, err) } case setting.UseMSSQL: |