This commit is contained in:
collerek
2021-02-01 13:09:01 +01:00
parent 04bbe13c09
commit 5a4c42b318
2 changed files with 10 additions and 8 deletions

View File

@ -234,12 +234,13 @@ def populate_meta_sqlalchemy_table_if_required(meta: "ModelMeta") -> None:
if not hasattr(meta, "table") and check_for_null_type_columns_from_forward_refs(
meta
):
meta.table = sqlalchemy.Table(
table = sqlalchemy.Table(
meta.tablename,
meta.metadata,
*[copy.deepcopy(col) for col in meta.columns],
*meta.constraints,
)
meta.table = table
def update_column_definition(