I want my model\'s primary key to be an autoincrementing integer. Here is how my model looks like
class Region(db.Model):
__tablename__ = \'regions\'
I had the same error, even after adding autoincrement=True.
The problem was I already had the migration created. So I downgraded to the previous migration, deleted the migration, created the migration again and upgraded.
Then the error was gone.
Hope it helps someone stuck on this.
Wrapping off: Add autoincrement=True, and ensure your migration is updated and applied.