From 89bb075ce6866ea1a0f9ec28f472d042fdc74a0b Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Fri, 19 Jun 2026 13:52:28 +0000 Subject: [PATCH] =?UTF-8?q?Keep=20the=20age-band=20unique=20constraint=20w?= =?UTF-8?q?ithin=20Postgres's=2063-char=20limit=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .../landlord_construction_age_band_override_table.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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", ), )