Skip to content

Cover JSON complex-property index migration scaffolding - #39476

Closed
AndriySvyryd with Copilot wants to merge 2 commits into
release/11.0from
copilot/fix-cannot-scaffold-migration-index
Closed

AndriySvyryd with Copilot wants to merge 2 commits into
release/11.0from
copilot/fix-cannot-scaffold-migration-index

Conversation

Copilot AI commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Indexes on JSON-mapped complex properties were reported to fail migration scaffolding because RelationalJsonIndex cannot be emitted as a C# literal. The production fix is already present; this change adds database-independent regression coverage.

  • Code generation: Compile generated migration, metadata, and snapshot code; verify the non-literal annotation is omitted and the snapshot round-trips without model differences.

  • SQL generation: Verify the compiled migration recovers JSON index metadata from its target model and emits:

    CREATE JSON INDEX [IX_People_Address_City] ON [People]([Address]) FOR (N'$.City');

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix cannot scaffold migration with index on JSON complex property Cover JSON complex-property index migration scaffolding Oct 30, 2026
Copilot AI requested a review from AndriySvyryd October 30, 2026 21:49
@AndriySvyryd
AndriySvyryd deleted the copilot/fix-cannot-scaffold-migration-index branch October 30, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot scaffold migration with index on JSON complex property: RelationalJsonIndex literal not supported

2 participants