Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25981 closed Cleanup/optimization (fixed)

Document the necessity to add on_delete param to old migrations

Reported by: karyon Owned by: Luis San Pablo
Component: Documentation Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

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 Tim Graham, 9 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:2 by Luis San Pablo, 9 years ago

Owner: changed from nobody to Luis San Pablo
Status: newassigned

comment:3 by Luis San Pablo, 9 years ago

Has patch: set

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

comment:4 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In a856555d:

Fixed #25981 -- Added need to update migrations to on_delete deprecation warning.

comment:5 by Tim Graham <timograham@…>, 9 years ago

In 4f2eb5fc:

[1.9.x] Fixed #25981 -- Added need to update migrations to on_delete deprecation warning.

Backport of a856555df2a1b4ddad8bf21243de0bcbcc12fb20 from master

Note: See TracTickets for help on using tickets.
Back to Top