You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PostgreSQL constraints doc shows the default temporal constraint name with a double underscore #154
area/constraintsTemporal (WITHOUT OVERLAPS, PERIOD) and exclusion constraintsdocumentationImprovements or additions to documentationpackage/postgresqlAffects EFCore.ComplexIndexes.PostgreSQL
Found in the 5.5.0 pre-tag gate probe (#36). This predates 5.5.0.
docs/postgresql-constraints.md, line 29, shows the default temporal constraint name as:
builder.HasTemporalConstraint(keyColumns: b =>b.RoomId,period: b =>b.ValidPeriod);// ALTER TABLE "Bookings" ADD CONSTRAINT "AK_Bookings__RoomId_ValidPeriod"
The differ builds the name as $"AK_{table}_{string.Join("_", keyColumns)}_{periodColumn}" (NpgsqlComplexIndexMigrationsModelDiffer.cs:1201). The name it actually produces is AK_Bookings_RoomId_ValidPeriod, with one underscore. On PostgreSQL 18 the gate probe's live run produced AK_role_grants_GranteeId_Period.
A consumer who copies the documented name, for example into a raw DROP CONSTRAINT, an IF EXISTS check or a test, targets a constraint that does not exist.
Fix: correct the comment to "AK_Bookings_RoomId_ValidPeriod", and check the composite-key sample below it the same way.
area/constraintsTemporal (WITHOUT OVERLAPS, PERIOD) and exclusion constraintsdocumentationImprovements or additions to documentationpackage/postgresqlAffects EFCore.ComplexIndexes.PostgreSQL
Activity