This is the implicit default behavior when id is a single-column primary key, but autoincrement=True must be set explicitly when the id column is used as a part of a multiple-column primary key. This allows subclassed models to specify additional columns as part of the primary key.
This is the implicit default behavior when
id
is a single-column primary key, butautoincrement=True
must be set explicitly when theid
column is used as a part of a multiple-column primary key. This allows subclassed models to specify additional columns as part of the primary key.https://docs.sqlalchemy.org/en/14/core/metadata.html?highlight=autoincrement#sqlalchemy.schema.Column.params.autoincrement