Skip to content

fix(migration-risk): group migrations by configured app label - #322

Merged
FROWNINGdev merged 2 commits into
FROWNINGdev:mainfrom
flipcyde101:work/orm-lens-308
Nov 19, 2026
Merged

FROWNINGdev merged 2 commits into
FROWNINGdev:mainfrom
flipcyde101:work/orm-lens-308

Conversation

@flipcyde101

Copy link
Copy Markdown
Contributor

Addresses the migration-risk part of #308.

Group migrations by the literal Django app label from an unambiguous AppConfig in apps.py. This keeps different apps in folders named tests from sharing a graph, while copies with the same label still share a graph. Map the current model schema by package path so a migration is compared with models from its own app.

On the five Ralph test apps named in the report (b80ca56), this removes all nine false conflict findings. The regression tests also cover local AppConfig inheritance, a real conflict spanning duplicate copies of one app, and a deletion warning for a model still declared in a relabeled app. drift and migration-deps use directory-name grouping.

Validation: 1,244 pytest tests and 145 subtests passed, with 6 skipped. Ruff and git diff --check passed. Windows Application Control blocked the local mypy executable, so mypy still needs GitHub CI.

I used Codex to help reproduce the issue, write the patch, and run the local checks.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

2 participants