Fix SQLite server_default AttributeError and pool_size errors (#35)
Fix SQLite server_default AttributeError and pool_size errors Co-authored-by: Barcode Betty <32+cs_betty@noreply.git.farh.net> Co-committed-by: Barcode Betty <32+cs_betty@noreply.git.farh.net>
This commit was merged in pull request #35.
This commit is contained in:
@@ -22,6 +22,9 @@ def engine():
|
||||
for col in table.columns.values():
|
||||
sd = col.server_default
|
||||
if sd is not None:
|
||||
if not hasattr(sd, "expression"):
|
||||
col.server_default = None
|
||||
continue
|
||||
expr_str = str(sd.expression).lower()
|
||||
if "gen_random_uuid" in expr_str or "gen_random_bytes" in expr_str:
|
||||
col.server_default = None
|
||||
|
||||
Reference in New Issue
Block a user