fix: update VARCHAR lengths to prevent truncation errors in audit_log and discharges
This commit is contained in:
@@ -132,7 +132,7 @@ class DischargeHeader(Base, TenantScopedMixin, TimestampMixin):
|
||||
)
|
||||
|
||||
# ── Cancellation trail ────────────────────────────────────────────────
|
||||
cancelled_by: Mapped[Optional[str]] = mapped_column(String(20))
|
||||
cancelled_by: Mapped[Optional[str]] = mapped_column(String(100))
|
||||
cancellation_reason: Mapped[Optional[str]] = mapped_column(String(300))
|
||||
|
||||
# ── Relationships ─────────────────────────────────────────────────────
|
||||
|
||||
@@ -30,12 +30,12 @@ class AuditLog(Base, TenantScopedMixin, TimestampMixin):
|
||||
|
||||
# Technical Columns
|
||||
timestamp = Column(DateTime(timezone=True), nullable=False, index=True) # Combined for queries
|
||||
system = Column(String(20), nullable=False, index=True, default="fixed_asset")
|
||||
system = Column(String(50), nullable=False, index=True, default="fixed_asset")
|
||||
|
||||
# Traceability
|
||||
table_name = Column(String(100), nullable=True, index=True)
|
||||
record_id = Column(String(255), nullable=True, index=True)
|
||||
operation_type = Column(String(20), nullable=True, index=True) # CREATE, UPDATE, DELETE, LOGIN
|
||||
operation_type = Column(String(50), nullable=True, index=True) # CREATE, UPDATE, DELETE, LOGIN
|
||||
|
||||
# Data Changes
|
||||
old_values = Column(JSONB, nullable=True)
|
||||
|
||||
@@ -42,7 +42,7 @@ class OctaveBalance(Base, TenantScopedMixin, TimestampMixin):
|
||||
origin_country: Mapped[str] = mapped_column(String(3)) # PAISORIGEN
|
||||
fraction_type: Mapped[str] = mapped_column(String(7)) # TIPOFRACIMPO
|
||||
sector: Mapped[str] = mapped_column(String(8)) # SECTOR
|
||||
octave_permit: Mapped[str] = mapped_column(String(20)) # PERMISOROCTAVA
|
||||
octave_permit: Mapped[str] = mapped_column(String(100)) # PERMISOROCTAVA
|
||||
origin: Mapped[str] = mapped_column(String(3)) # PROCEDENCIA ('TEM')
|
||||
system: Mapped[str] = mapped_column(String(5)) # SISTEMA ('fixed_asset | inventory')
|
||||
line: Mapped[int] = mapped_column(Integer) # LINEA
|
||||
|
||||
Reference in New Issue
Block a user