Repository navigation
Tests: catch the seeded core and SQL Server differ defects; render SQL Server SQL with the model - #113
Merged
Conversation
CaffeinatedCoder
force-pushed
the
tests/96-sqlserver-seeds
branch
from
October 20, 2026 06:09
f8eab8a to
981c13b
Compare
CaffeinatedCoder
force-pushed
the
fix/92-core-refuses-satellite-options
branch
from
October 20, 2026 06:09
98ea257 to
319ddbd
Compare
… Server SQL with the model (#96) The 5.5.0 analysis seeded defects the suite did not notice; each now fails a test written for it: - Descending dropped from ResolvedIndexPart equality: a direction-only change produced no migration. IndexChangeDetectionTests re-creates the index on a direction-only, uniqueness-only, filter-only and provider-option-only change, each seeded out of IndexDescriptor equality. - FillFactor, or Clustered and SortInTempDb, removed from the SQL Server whitelist; TransformIndexAnnotation skipped on the property-level path: every SQL Server test was entity-level. A property-level test covers all six options and INCLUDE path resolution, and BuilderApiParityTests now also checks that every option a builder sets is forwarded (both satellites). - CanRenameIndexes => false on SQL Server: a name-only change renders sp_rename. - The native-clustered-index branch: covered by #90's test, proven here. - A SQL Server snapshot round trip: six options property- and entity-level, a DESC part and a placeholder filter, without churn. MigrationHarness.SqlServerSql takes the target model and renders with it, as database update does. With model: null, SQL Server's generator added its pre-2.0 IS NOT NULL filter to unique indexes over nullable columns, which hid #88; a test renders a filterless index and fails with model: null. 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
force-pushed
the
tests/96-sqlserver-seeds
branch
from
October 20, 2026 06:26
981c13b to
01c1a52
Compare
CaffeinatedCoder
changed the base branch from
fix/92-core-refuses-satellite-options
to
main
October 20, 2026 06:37
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 #96
Stacked on #107 (#92) → #105 (#90) → #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.Problem
The 5.5.0 core and SQL Server analysis seeded defects, and the whole suite passed with each one applied:
Descendingremoved fromResolvedIndexPartequality: changingx.AtoDbOrder.Desc(x.A)produced no migration (silent).FillFactor, orClusteredandSortInTempDb, removed from the SQL Server whitelist: property-level declarations lost them, since every SQL Server differ test was entity-level andBuilderApiParityTestschecked only whitelist → builder.TransformIndexAnnotationskipped on the property-level path: INCLUDE paths stayed unresolved.CanRenameIndexes => falseon SQL Server.And a harness trap:
MigrationHarness.SqlServerSqlrendered withmodel: null, which makes EF's SQL Server generator add its pre-2.0IS NOT NULLfilter to every unique index over nullable columns (UseLegacyIndexFilters).database updatenever adds it, and that is what hid #88.Change
Test-only; no changelog line.
MigrationHarness.SqlServerSql(operations, target)takes the target model and renders with it.SqlServerDifferTests' private generator delegates to it, and every caller passes its model.IndexChangeDetectionTests(new): a direction-only, uniqueness-only, filter-only and provider-option-only change each drops and re-creates the index, and an unchanged index produces nothing.SqlServerDifferTests: a property-level test with all six options and INCLUDE property paths, asserting the forwarded annotations and the rendered DDL, and a name-only change renderingsp_rename.BuilderApiParityTests: every option a satellite's builder sets is forwarded by its differ, for both satellites. It callsIsForwardedIndexAnnotationon a real differ.KeysSetBycomes from Core: refuse a satellite's index options instead of dropping them #107.SqlServerNullableUniqueTests: a filterless unique index over nullable columns renders without a filter. Withmodel: nullit gains the legacy one.SnapshotRoundTripTests: the generate-compile-rebuild helper takes the provider. A SQL Server round trip covers every option property- and entity-level, a DESC part and a placeholder filter. It asserts four creates from nothing, so an empty diff is not vacuous.Tests
Each seed applied on its own, full unit suite, sources restored after each (
git statusclean):Descendingout ofResolvedIndexPartequality and hashFillFactorout of the SQL Server whitelistClusteredandSortInTempDbout of the whitelistTransformIndexAnnotationskippedName/Contact.Emailunresolved)CanRenameIndexes => falsesp_renametestIsUniqueout ofIndexDescriptorequality and hashFilterout of equality and hashmodel: nullFull unit suite: 426 passed.
🤖 Generated with Claude Code