diff --git a/mindsdb_sql/__about__.py b/mindsdb_sql/__about__.py index 4627df1..63ba175 100644 --- a/mindsdb_sql/__about__.py +++ b/mindsdb_sql/__about__.py @@ -1,6 +1,6 @@ __title__ = 'mindsdb_sql' __package_name__ = 'mindsdb_sql' -__version__ = '0.18.0' +__version__ = '0.18.1' __description__ = "Pure python SQL parser" __email__ = "jorge@mindsdb.com" __author__ = 'MindsDB Inc' diff --git a/mindsdb_sql/render/sqlalchemy_render.py b/mindsdb_sql/render/sqlalchemy_render.py index dc3f704..df08a26 100644 --- a/mindsdb_sql/render/sqlalchemy_render.py +++ b/mindsdb_sql/render/sqlalchemy_render.py @@ -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'