From de8a091767eff6eecfcd2a630441ddaccb271303 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Fri, 9 Mar 2018 03:20:57 +0200 Subject: Fix MySQL and PostgreSQL column drop SQL (#3649) --- models/migrations/migrations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models/migrations') 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: -- cgit v1.2.3