Skip to content

Commit de8a091

Browse files
lafriksappleboy
authored andcommitted
Fix MySQL and PostgreSQL column drop SQL (#3649)
1 parent 1a83581 commit de8a091

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/migrations/migrations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func dropTableColumns(x *xorm.Engine, tableName string, columnNames ...string) (
233233
}
234234
cols += "DROP COLUMN `" + col + "`"
235235
}
236-
if _, err := x.Exec(fmt.Sprintf("ALTER TABLE `%s` %s", tableName, columnNames)); err != nil {
236+
if _, err := x.Exec(fmt.Sprintf("ALTER TABLE `%s` %s", tableName, cols)); err != nil {
237237
return fmt.Errorf("Drop table `%s` columns %v: %v", tableName, columnNames, err)
238238
}
239239
case setting.UseMSSQL:

0 commit comments

Comments
 (0)