fix column compiling

This commit is contained in:
Izalia Mae 2022-09-25 07:38:00 -04:00
parent 93039ac248
commit af0546de3e

View file

@ -157,7 +157,7 @@ class DbTables(DotDict):
columns.append(column.compile(dbtype))
if column.foreign_key:
fkey_table, fkey_col = column.foreign_key.split('.', 1)
fkey_table, fkey_col = column.foreign_key
foreign_keys.append(f"FOREIGN KEY ('{column.name}') REFERENCES '{fkey_table}' ('{fkey_col}')")
if foreign_keys: