diff --git a/asyncqlio/orm/schema/column.py b/asyncqlio/orm/schema/column.py index ba217d6..123711e 100644 --- a/asyncqlio/orm/schema/column.py +++ b/asyncqlio/orm/schema/column.py @@ -207,9 +207,12 @@ def autoincrement(self) -> bool: """ Whether this column is set to autoincrement. """ - if isinstance(self.table.metadata.bind.dialect, sqlite3.Sqlite3Dialect): - return self.primary_key and isinstance(self.type, md_types.Integer) - return isinstance(self.type, md_types.Serial) + try: + if isinstance(self.table.metadata.bind.dialect, sqlite3.Sqlite3Dialect): + return self.primary_key and isinstance(self.type, md_types.Integer) + return isinstance(self.type, md_types.Serial) + except AttributeError: + return False # DDL stuff @classmethod