Repository navigation
Core: refuse a satellite's index options instead of dropping them - #107
Merged
Merged
Conversation
CaffeinatedCoder
force-pushed
the
fix/90-sqlserver-clustered-and-key-names
branch
from
October 20, 2026 06:09
a678e57 to
2a0060b
Compare
CaffeinatedCoder
force-pushed
the
fix/92-core-refuses-satellite-options
branch
from
October 20, 2026 06:09
98ea257 to
319ddbd
Compare
#92) The core differ forwards no property-level provider option. When a SQL Server or PostgreSQL model was diffed by it instead of the satellite's differ (UseComplexIndexes() where UseSqlServerComplexIndexes() or UseNpgsqlComplexIndexes() belongs, or no satellite .targets at design time), INCLUDE, FILLFACTOR, ONLINE, SORT_IN_TEMPDB, DATA_COMPRESSION, CLUSTERED or a GIN method vanished without a word, and EnsureCreated() applied the rest cleanly. Entity-level options went through unchecked and unresolved (INCLUDE kept property paths as column names). The core differ now knows each satellite's forwarded options and the registration that selects its differ. On the target model, a declaration carrying an option of the provider being diffed that this differ does not forward fails, naming that registration. Only the provider the differ serves is checked, so a model shared with SQLite tests keeps its Npgsql options inert, and the satellites, which forward their own options, are unaffected. Verified by seeding: without the call, the five refusal tests fail; with FillFactor missing from the core's list, the builder-coverage test fails; checking the source too fails the target-only test; ignoring the provider fails the shared-model SQLite test. BuilderApiParityTests exposes the builder-invocation loop as KeysSetBy for reuse. Changed answer: Changed answers row in the root and core changelogs, entry in docs/upgrading.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
CaffeinatedCoder
force-pushed
the
fix/92-core-refuses-satellite-options
branch
from
October 20, 2026 06:26
319ddbd to
0c27caa
Compare
CaffeinatedCoder
changed the base branch from
fix/90-sqlserver-clustered-and-key-names
to
main
October 20, 2026 06:33
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 #92
Stacked on #105 (#90), which is stacked on #103 (#91). Merge in that order. The
.NETworkflow runs only on PRs intomain/release/**, so this branch's CI is aworkflow_dispatchrun on the same commit;pr-hygieneruns once the PR is retargeted tomain.Problem
The core differ forwards no property-level provider option (
IsForwardedIndexAnnotationis false for everything). When a SQL Server or PostgreSQL model is diffed by the core differ instead of the satellite's, every property-level option is dropped without a word. That happens withUseComplexIndexes()whereUseSqlServerComplexIndexes()/UseNpgsqlComplexIndexes()belongs, or when the satellite's.targetsis not imported:EnsureCreated()applied it cleanly. Entity-level options reached the operation, but without the satellite's checks or resolution: anINCLUDElist keptAddress.Codeas a column name, and nothing checked the clustered slot.Change
CustomMigrationsModelDiffer:Npgsql:StorageParameter:prefix), the provider namespace its type mapping source lives in, and the registration that selects its differ.ValidateNoSatelliteOptions(target)runs with the other target-only checks. A declaration carrying an option of the provider being diffed, which this differ does not forward, throws and names the registration to use, at runtime and fordotnet ef.Npgsql:/SqlServer:options inert on SQLite, as EF does with other providers' annotations.SqlServer:ValueGenerationStrategy,Npgsql:Compression, …).ComplexIndexDbContextOptionsExtensions: the remark onUseComplexIndexes()says it refuses those options.BuilderApiParityTests.KeysSetByexposes the existing builder-invocation loop for reuse.### Changed answersin the root and core changelogs, and an entry, "The core differ refuses SQL Server and PostgreSQL index options", indocs/upgrading.md:EnsureCreated(),GenerateCreateScript()andMigrate(), whose pending-changes check runs the same differ. The fix is one line.Tests
CoreDifferSatelliteOptionTests, eleven tests:SqlServer:Include,Npgsql:IndexMethod, andNpgsql:StorageParameter:fillfactor. Each names the registration to use.GenerateCreateScript()on a context withUseSqlServer(…).UseComplexIndexes()refuses.Seeded, each failing as expected:
ValidateNoSatelliteOptionscall removed: the five refusal tests fail.SqlServer:FillFactorremoved from the core's list: the coverage test fails.Full unit suite: 415 passed.
🤖 Generated with Claude Code