#25981 closed Cleanup/optimization (fixed)
Document the necessity to add on_delete param to old migrations
Description ¶
When going through the deprecation warnings i got when updating to django 1.9, i was surprised to find out that even after adding on_delete to all ForeignKeys i had and adding the according migration, the old migrations still threw those errors.
Apparently (see PR i'm supposed to edit old migrations. i think this is something that should go into the docs (release notes?), as i was pretty surprised by that and found the "solution" only after digging until i got to the PR.
Change History (5)
comment:1 by , 9 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 9 years ago
Has patch: | set |
---|
Note:
See TracTickets
for help on using tickets.
The documentation is already in the release notes:
https://docs.djangoproject.com/en/1.9/releases/1.9/#foreignkey-and-onetoonefield-on-delete-argument
So I just updated the warning to explain that the migrations should also be upgraded.
https://github.com/django/django/pull/5869