Fixed #29177: FKs accessible in subsequent migrations for unmanaged models#19452
Fixed #29177: FKs accessible in subsequent migrations for unmanaged models#19452michalnik wants to merge 3 commits intodjango:mainfrom
Conversation
0aeec5c to
2b75fd6
Compare
19d2f91 to
8508370
Compare
|
Regarding merge conflicts, they are caused by unrelated changes introduced after this fix. |
|
@michalnik I'm not a maintainer but I think you will need to resolve the conflicts before a reviewer looks at the pull request. After a successful review and the ticket is marked for checkin, then a merger will look at the pull request. |
Ok, currently I will start working on it @coolbootscoder Thanks for the note! I double-checked the Django docs and you're correct — conflicts need to be resolved before a reviewer can look at the PR: |
dec247a to
057ed67
Compare
74101a7 to
d0d5960
Compare
|
Sorry, currently I am struggling with anything from my previous commits did not work as expected. |
|
At my localhost, runtests ended up with success! 💯 I made changes in the core of the autodetector tool used while migrations run and It has potential to fix the bug. So, I hope, that we can discuss what i am not sure what to do with it or anything you want. I wrote 2 kinds of tests:
Questions:
Please, add the label "needs discussion" if it makes sense to you, thanx 👍 |
a2172f6 to
89d264a
Compare
89d264a to
4b467e0
Compare
4b467e0 to
de5f93c
Compare
📊 Coverage Report for Changed FilesNote: Missing lines are warnings only. Some lines may not be covered by SQLite tests as they are database-specific. For more information about code coverage on pull requests, see the contributing documentation. |
Integration tests part (test_autodetector_unmanaged) 1) On creation of a new managed=False model in migration with FK. 2) On addition of a FK field to already created managed=False model. 3) On removing of a FK field from already created managed=False model. Unit tests part (test_autodetector) 1) add FK to unmanged model 2) remove FK from unmanaged model 3) rename FK within unmanaged model
Work done
Trac ticket number
ticket-29177
Branch description
Provide a concise overview of the issue or rationale behind the proposed changes.
Checklist
mainbranch.