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
Planner, first slice: declarations on both sides become descriptors, matched, planned and ordered around EF Core's operations #63
area/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)
The first slice of #24, which stays open for the rest.
Problem
The host splices what an ISchemaOperationPlanner returns around the inner differ's operations, and the only planner in the kernel is NoSchemaOperations. A stored declaration never becomes a statement.
Reads both sides. Every declaration on every entity type of the source and of the target model is read through its contributor and resolved through the kernel's resolver into a descriptor. A declaration whose owner has no contributor is an error (the explicit way out is A declaration for another provider is an error, unless the options ignore that provider #22).
Matches (plan, section 3.6): equal descriptors are the same object and produce nothing; the rest are paired on kind, scope and name, then on equality but for the name; what is left is drops and creates.
Asks Plan for each pair: None adds nothing, InPlace adds the statements the contributor wrote, Rebuild adds a drop and a create.
Orders: drops before EF Core's operations, then in-place statements and creates after them, contributors by their placement. A BeforeTables contributor is the other way round: created before, dropped after.
A context with no declaration on either side gets an empty plan without resolving the dialect or a contributor.
EF Core's operations as BaseChange and ImpactOf: until then a descriptor that reads a renamed column or table differs and is rebuilt, and an object the database loses with an operation of EF Core's while both models declare it unchanged (SQLite's table rebuild) is not re-created.
The table of every MigrationOperation type, and the error for one outside it.
Ordering by Dependency.SchemaObject between objects.
Deleting the tests' stand-in planner in Harness/TestKit.cs, which the host's own tests still use.
Done when
Through the real host, on Npgsql, SQL Server and SQLite: a model against its own compiled snapshot gives no operation; a new, a removed, a renamed and a changed declaration give the statements above in that order; and each rule is shown to fail a test when undone.
area/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)
Activity