Repository navigation
feat: a 5.x annotation that nothing reads is refused, not passed over - #95
Merged
Merged
Conversation
The source side of a diff refuses an entity type that carries a declaration of EFCore.ComplexIndexes 5.x with no registered reader: its indexes, its temporal constraints, and its exclusion constraints on a context without the PostgreSQL package. Passed over, those objects were created a second time or never dropped, without an error. A second fixture scaffolded by the published 5.6.0 says where 5.x puts each of them. Closes #93 Co-Authored-By: Claude Fable 5.2 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #93
Problem
The planner reads SchemaKit's own annotations and, since #92, a 5.x annotation that has a registered reader. Everything else
EFCore.ComplexIndexes5.x stored in a snapshot was passed over: its indexes, its temporal constraints, and its exclusion constraints on a context without the PostgreSQL package. A project that moved got a first migration that looked right. Declared again, an object 5.x built was created a second time; removed from the model, it was never dropped. Neither was an error.Change
LegacyFormats(kernel, internal) lists the annotations of 5.x that declare an object:CustomIndex:CompositeIndexes,CustomTemporal:Constraints,CustomTemporal:ForeignKeysandCustomExclusion:Constraintson an entity type, andCustomIndex:IsIndexedon a property of a complex type, at any depth.false; the two model-level annotations, which declare nothing.ScaffoldedOtherKinds: an index on a property of a complex type, an index on the entity type, a temporal constraint.generate.shnow scaffolds both contexts, and a second run leaves the first fixture byte for byte as it was.Tests
Locally: 489 kernel tests, 108 PostgreSQL tests offline, 38 on PostgreSQL 18.6.
GetDifferencesandHasDifferencesrefuse a diff from it. The kernel's hand-built cases stand on those places being right.Guards shown to fail. Ten defects seeded one at a time: the planner not asking, each list entry removed, the property marker not looked for, complex properties not walked, an empty annotation counted, a
falsemarker counted, a registered reader not exempting its annotation. Each failed its test.Decisions in this PR that are not confirmed
migrations add. That is the point, but it meanspreview.1cannot be tried at all on a project with 5.x indexes or temporal constraints.CustomTemporal:ForeignKeysis listed although no published 5.x writes it: it is in 5.x's source.🤖 Generated with Claude Code