diff --git a/infrastructure/postgres/landlord_construction_age_band_override_table.py b/infrastructure/postgres/landlord_construction_age_band_override_table.py index 598bbf56..91eec66e 100644 --- a/infrastructure/postgres/landlord_construction_age_band_override_table.py +++ b/infrastructure/postgres/landlord_construction_age_band_override_table.py @@ -23,10 +23,14 @@ from infrastructure.postgres.landlord_override_enums import override_source_sa_e class LandlordConstructionAgeBandOverrideRow(SQLModel, table=True): __tablename__: ClassVar[str] = "landlord_construction_age_band_overrides" # pyright: ignore[reportIncompatibleVariableOverride] __table_args__: ClassVar[tuple[UniqueConstraint, ...]] = ( # pyright: ignore[reportIncompatibleVariableOverride] + # NB: shortened (drop the redundant ``_overrides``) to stay within + # PostgreSQL's 63-char identifier limit -- the full + # ``landlord_construction_age_band_overrides_portfolio_description_unique`` + # is 68 chars and would be silently truncated, diverging from Drizzle. UniqueConstraint( "portfolio_id", "description", - name="landlord_construction_age_band_overrides_portfolio_description_unique", + name="landlord_construction_age_band_portfolio_description_unique", ), )