Add versioned Client FY Accounting Mirrors
This commit is contained in:
@@ -21,7 +21,8 @@ class AccountingMirrorRegistry(CommonBase):
|
||||
"tenant_id",
|
||||
"client_id",
|
||||
"financial_year",
|
||||
name="uq_accounting_mirror_registry_client_fy",
|
||||
"version_no",
|
||||
name="uq_accounting_mirror_registry_client_fy_version",
|
||||
),
|
||||
)
|
||||
|
||||
@@ -40,9 +41,14 @@ class AccountingMirrorRegistry(CommonBase):
|
||||
voucher_to_date: Mapped[date | None] = mapped_column(Date, nullable=True)
|
||||
file_size_bytes: Mapped[int] = mapped_column(BigInteger, nullable=False, default=0)
|
||||
|
||||
version_no: Mapped[int] = mapped_column(Integer, nullable=False, default=1, index=True)
|
||||
is_current: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True, index=True)
|
||||
status: Mapped[str] = mapped_column(String(30), nullable=False, default="active", index=True)
|
||||
is_active: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True, index=True)
|
||||
replacement_count: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
|
||||
supersedes_mirror_id: Mapped[int | None] = mapped_column(
|
||||
ForeignKey("accounting_mirror_registry.id", ondelete="SET NULL"), nullable=True, index=True
|
||||
)
|
||||
|
||||
created_by_user_id: Mapped[int | None] = mapped_column(ForeignKey("users.id", ondelete="SET NULL"), nullable=True)
|
||||
last_synced_by_user_id: Mapped[int | None] = mapped_column(ForeignKey("users.id", ondelete="SET NULL"), nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user