Skip to content
This repository was archived by the owner on May 13, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions asyncqlio/orm/schema/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down