Repository navigation
Closed
Labels
area/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQL
Milestone
Description
The name-claim part of #44, and the last guard #25 lists (design, section 9.8).
Problem
A contributor answers Claims for each descriptor, and nothing asks. Two objects that take one name are found by the database at apply, in the middle of a migration: an exclusion constraint named like an index anywhere in its schema (its backing index is a relation), or like the table's primary key. Two unnamed declarations that differ only in an option get different keys and the same default name, which the declaration store leaves to this check on purpose.
Change
- The planner collects the claims of every object the target model declares, and those of EF Core's own tables, indexes, keys, foreign keys, check constraints and sequences. Which namespace a kind of EF Core's occupies is the provider's rule, so the dialect answers it: the kernel's default, and PostgreSQL's (an index is a relation; a primary key and a unique constraint claim a constraint name and a relation name).
- Two claims of one namespace and one name are a collision when at least one party is SchemaKit's. Names compare by the declaration's rule.
- Every collision of the model is reported in one
SchemaValidationException, each as aSchemaDiagnosticwith the idSK1001and both parties named. - Target only: a snapshot that holds a collision stays diffable.
Done when
- An exclusion constraint named like another table's index, like its table's primary key, and like another exclusion constraint of the same table is each reported with both parties, and the same model fails with 42P07 or 42710 on a live server when the check is switched off.
- Two findings in one model arrive in one exception.
- A collision in the snapshot alone does not stop a diff.
- The seeded defect of Tests the analysis of the first two PgExclusion slices found missing #84 (the constraint's name qualified with its table's schema) fails a test.
Not here, and staying with #44: ids for the kernel's existing refusals, warnings through the diagnostics logger, SQL Server's scopes (they come with its package, #29).
Metadata
Metadata
Assignees
Labels
area/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQL
Activity