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
Name claims take a table without a schema and a table in public for two schemas, and the collision fails at apply #100
area/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringbugSomething isn't workingpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQLseverity/mediumInconsistency or failure in a narrow scenario
Found by the pre-preview sweep of main @ 948496a (lens: base operations; a lead of the new-check lens and of GPT's read); reproduced on PostgreSQL 18.
What happens
The model sets no default schema. An exclusion constraint is on role_grants (no schema), and an EF Core index of the same name is on ToTable("bookings", "public"). No SK1001 is raised, and the migration fails at apply:
The claims are Relation(null, name) and Relation("public", name), and NameClaims compares the schemas as text (NameClaims.cs:108-124). The relational model carries a model's default schema where one is set; where none is, the schema is null and the server puts the table where search_path says, which is public on a stock database. NpgsqlSchemaDialect.Claims does not say that.
The dialect names the schema a table without one lands in (public for PostgreSQL, dbo for SQL Server with #29), and claims are compared under it. A search_path that says otherwise is a database the model does not describe.
Test
A row in NameClaimTests offline, its row in NameClaimLiveTests, as for every other row of the namespace table.
area/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringbugSomething isn't workingpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQLseverity/mediumInconsistency or failure in a narrow scenario
Activity