Skip to content

[9.0] Preserve inherited HiLo sequences in model snapshots - #4034

Merged
roji merged 1 commit into
hotfix/9.0.5from
roji-hilo-snapshot-backport-9-0
Oct 18, 2026
Merged

roji merged 1 commit into
hotfix/9.0.5from
roji-hilo-snapshot-backport-9-0

Conversation

@roji

@roji roji commented Oct 18, 2026

Copy link
Copy Markdown
Member

Backport of #4031 (commit bde0e12) to hotfix/9.0.5, with no code or test adaptations.

Property-level HiLo snapshot calls now inherit the model's sequence name and schema when not explicitly overridden. This prevents an unwanted default sequence from causing repeated DropSequence migrations and pending-model-change errors, while preserving explicit property overrides and public UseHiLo behavior.

Regression coverage includes all four inherited name/schema combinations and explicit property overrides. All four new cases fail before the fix; all 21 NpgsqlAnnotationCodeGeneratorTest cases pass afterward on .NET 9.

Fixes #3613

Backport bde0e12 from #4031 for #3613.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 373754c9-0387-441e-ad12-c24b8ed792b1
@roji roji linked an issue Oct 18, 2026 that may be closed by this pull request
@roji
roji merged commit 909bcee into hotfix/9.0.5 Oct 18, 2026
10 checks passed
@roji
roji deleted the roji-hilo-snapshot-backport-9-0 branch October 18, 2026 20:55
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.

EF Core continuous migration error with npgsql HiLo

1 participant