Skip to content

Commit

Permalink
Merge pull request #398 from mindsdb/fix-render
Browse files Browse the repository at this point in the history
Fix sqlalchemy render
  • Loading branch information
ea-rus authored Sep 2, 2024
2 parents 45c4643 + cae4126 commit bea9557
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mindsdb_sql/render/sqlalchemy_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,8 @@ def prepare_create_table(self, ast_query):
if col.default is not None:
if isinstance(col.default, str):
default = sa.text(col.default)
if col.type.lower() == 'serial':

if isinstance(col.type, str) and col.type.lower() == 'serial':
col.is_primary_key = True
col.type = 'INT'

Expand Down

0 comments on commit bea9557

Please sign in to comment.