From dde9c38bb8ebf15080431ffc504326f6354461a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 3 Feb 2023 13:26:20 +0800 Subject: [PATCH] Fixed the primary key of the Account data model to be not auto-incrementing. --- src/accounting/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/accounting/models.py b/src/accounting/models.py index 2695a64..d7efd84 100644 --- a/src/accounting/models.py +++ b/src/accounting/models.py @@ -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"),