fix(minor): quote the column names in alter table

This commit is contained in:
Rushabh Mehta 2020-08-31 11:29:06 +05:30
parent 39e36e01cd
commit 5e4ee1a6bc

View file

@ -49,7 +49,7 @@ class PostgresTable(DBTable):
elif col.fieldtype in ("Check"):
using_clause = "USING {}::smallint".format(col.fieldname)
query.append("ALTER COLUMN {0} TYPE {1} {2}".format(
query.append("ALTER COLUMN `{0}` TYPE {1} {2}".format(
col.fieldname,
get_definition(col.fieldtype, precision=col.precision, length=col.length),
using_clause)