Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21499 closed Cleanup/optimization (fixed)

Migrations won't work if field signature changes

Reported by: Markus Holtermann Owned by: rjasjukaitis
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: info@…, rjasjukaitis Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

If the __init__ signature of a model field changes in the way that e.g. a positional argument is added / removed and doesn't replace / isn't replaced by a previously existing keyword argument, the old migration files won't work any more because the rely on the actual __init__ signature to create an instance of the field.

This should be documented in the respective custom field and migration docs.

Change History (6)

comment:1 by Markus Holtermann, 11 years ago

Cc: info@… added
Easy pickings: set

comment:2 by Florian Apolloner, 11 years ago

Triage Stage: UnreviewedAccepted

comment:3 by rjasjukaitis, 11 years ago

Owner: set to rjasjukaitis
Status: newassigned

comment:4 by rjasjukaitis, 11 years ago

Cc: rjasjukaitis added

I added a paragraph to the migration documentation. Asking for review: https://github.com/django/django/pull/1985

comment:5 by Raphael Jasjukaitis <r.jasjukaitis@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 455e2896b122a331057483634bea9c8074bdc97d:

Fixed #21499 -- Added a paragraph to the docs.

comment:6 by Andrew Godwin <andrew@…>, 11 years ago

In 0c46ca83e820cd725f5d0fa299c2b5405bfeee1b:

Merge pull request #1985 from raphaa/21499

Fixed #21499 -- Migrations won't work if field signature changes

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