-
Notifications
You must be signed in to change notification settings - Fork 150
Restore Meta.indexes after RenameField and AlterField
#584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Gaurav Sharma (bewithgaurav)
merged 84 commits into
microsoft:dev
from
robberwick:rename-alter-meta-indexes
Sep 30, 2026
Merged
Changes from 6 commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
c1c81eb
Test #499: remove @expectedFailure from rename+alter Meta.indexes tests
robberwick f19cff5
Fix #499: restore Meta.indexes when RenameField and AlterField in sam…
robberwick 00ec61d
CHORE: fields_orders is an iterable of tuples
daa32ea
Test #499: cover stale Meta.indexes rebuilding
aa29f82
Fix #499: reconcile stale Meta indexes
b03cb8e
Merge branch 'dev' into rename-alter-meta-indexes
bewithgaurav d7cad43
Test #499: cover metadata index restoration
9cc58a5
Test #499: cover expression condition renames
d94f235
Fix #499: reconcile stale Meta indexes
ec45ac7
Merge branch 'dev' into rename-alter-meta-indexes
bewithgaurav 59f9b69
Fix #499: reconcile reused stale index field names
3fe3943
Fix #499: preserve filtered index literals on rename
23aea2b
Test #499: document deferred filtered index rename limitation
d52e26d
Test #499: cover filtered index multiple renames
039c171
Test #499: isolate deferred filtered index regression
eea286b
Fix #499: compose filtered index rename replacements
2d19bc9
Chore: Add docstrings to DatabaseSchemaEditor helpers
851bdb2
Test #499: cover tuple RHS filtered index dependency
5361368
Fix #499: track tuple RHS filtered index expressions
cb86c1f
Test #499: cover bracketed filtered index literal
c5cadde
Fix #499: track filtered index renames structurally
bfb4e89
Fix: retain filtered Meta indexes after renames
ed81517
Fix: support unbound schema alter fields
e05e449
Fix: track deferred unique index columns
ff34916
Test #499: reproduce restart-boundary Meta.indexes state
3ede797
Fix #499: persist Meta.indexes through field renames
75b4622
Test #499: cover deferred filtered Meta.indexes rename
126626a
Fix #499: defer filtered Meta.index condition rendering
52eb4d0
Fix #499: retain Django 3.2 compatibility
713de64
Test #499: cover Django 3.2 predicate-only index rename
bd22a59
Fix #499: reconcile Django 3.2 index rename state
9affcaf
Test #499: cover deferred conditional unique rename
31805bb
Fix #499: retain deferred unique predicates structurally
2cfb824
Test #499: cover Meta.index lost after combined rename and alter
e51cf6f
Fix #499: restore Meta.indexes dropped by a combined rename and alter
9408b6c
Test #499: cover stale Meta.constraint after rename
0459576
Fix #499: sync Meta.constraints on field rename
190dec3
Test #499: cover optimizer-folded rename losing Meta.index
970dd7e
Fix #499: rewrite Meta.indexes/constraints when the optimizer folds a…
215cbfe
Test #499: cover tuple-wrapped and transformed F() rename
042d2ef
Fix #499: rewrite F() references in list/tuple RHS values and transforms
a899e93
Test #499: cover unbound replacement field in filtered-index restore
5ae691a
Fix #499: use the meta_model fallback for unbound replacement fields
28ec09e
Test #499: cover deferred Meta.index restore-vs-create collision
611ba83
Fix #499: track actually-dropped index names to avoid deferred-create…
32b231e
Test #499: cover pk-alias condition crashing an unrelated alter
df40a16
Fix #499: resolve the pk alias before index-condition field lookups
3554176
Test #499: strengthen transformed-F assertion and cover Django 3.2 co…
65e3ee1
Test #499: cover Meta.index lost after AutoField db_column rename
dc8f200
Fix #499: track AutoField-path dropped indexes and restore regardless…
85bf743
Test #499: cover covering UniqueConstraint losing INCLUDE semantics o…
0674cd4
Fix #499: give structured constraint restoration exclusive control ov…
0466cd9
Test #499: cover OR-condition guard bypass via CreateModel
da92af6
Fix #499: apply OR-condition guard to CreateModel deferred unique con…
3ebaee2
Test #499: pin include field db_column resolution for covering constr…
fd48d22
test: reproduce nested-OR and negated-Q unique constraint guard gaps
8cf1672
fix: recursively validate unique constraint conditions for nested OR/…
1e79fa7
test: reproduce lost db_index/unique_together/UniqueConstraint after …
3b663ab
fix: restore db_index/unique_together/UniqueConstraint after AutoFiel…
569378f
test: reproduce stale ForeignKey attname in renamed Meta.index/constr…
0ea1feb
fix: rewrite ForeignKey attname references in renamed Meta.index/cons…
70a837a
test: reproduce unresolved pk-alias in renamed FK-backed primary key …
70d37a4
fix: resolve pk alias in renamed-field condition membership checks
0662f6c
test: cover pk-alias condition on a plain Meta.Index (not just Unique…
9f050de
perf: fetch Meta.index catalog metadata in one query, not one per index
6d03096
Merge branch 'dev' into rename-alter-meta-indexes
bewithgaurav 2021eb0
Merge branch 'dev' into rename-alter-meta-indexes
bewithgaurav d3bee44
Test #584: expose deferred unique-together collision
3b2868b
Fix #584: deduplicate deferred unique-together restore
72fdc0b
Test #619: expose conditional constraint alter failures
38dbaab
Fix #619: restore conditional constraints after alters
1be6cd5
Test #584: run deferred unique coverage on supported Django
9650e2d
Docs #584: document structured migration fixes
a631911
Test #584: expose stale positional expressions after renames
93127f3
Fix #584: rewrite positional expressions after renames
69a1dbc
Docs #584: scope changelog entry to migrations actually fixed
96f5d94
Test #584: cover renamed field in deferred unique_together condition
43b5ef0
Merge branch 'dev' into rename-alter-meta-indexes
bewithgaurav b49b6bb
CHORE: Cover squashmigrations in a fresh CLI process
bewithgaurav 5256b9f
CHORE: Reuse the test database for squashmigrations
bewithgaurav 8f6ce7e
Test #584: cover custom Index/UniqueConstraint subclasses with non-st…
84b8c9c
Fix #584: clone Meta index/constraint attributes instead of reconstru…
0308637
FIX: Preserve custom conditional constraint hooks
bewithgaurav a841bee
FIX: Preserve custom conditional index hooks
bewithgaurav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.