Fixed the primary key of the Account data model to be not auto-incrementing.

This commit is contained in:
依瑪貓 2023-02-03 13:26:20 +08:00
parent fecf33baa8
commit dde9c38bb8

View File

@ -85,7 +85,8 @@ class Account(db.Model):
"""An account."""
__tablename__ = "accounting_accounts"
"""The table name."""
id = db.Column(db.Integer, nullable=False, primary_key=True)
id = db.Column(db.Integer, nullable=False, primary_key=True,
autoincrement=False)
"""The account ID."""
base_code = db.Column(db.String, db.ForeignKey(BaseAccount.code,
ondelete="CASCADE"),