Since some backends (e.g. PostgreSQL) repoint constraints along with
renames, we need to make sure that no AlterField is triggered with a
rename and then have RenameModel deal with the FKs on MySQL (and perhaps
Oracle?)
--
Ticket URL: <https://code.djangoproject.com/ticket/22248>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_docs: => 0
* needs_tests: => 0
* needs_better_patch: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:1>
* severity: Release blocker => Normal
Comment:
I'm marking model renames as irreversible for now in order to move this
away from release blocker status; there's other irreversible core
operations, and we can address this if we get time before the final.
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:2>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:3>
Comment (by timo):
There's a test in tests/migrations/test_operations.py
(test_rename_model_with_related) that should be uncommented when this is
fixed.
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"4ce7a6bc84c68406e39f48550434faeef3277eba"]:
{{{
#!CommitTicketReference repository=""
revision="4ce7a6bc84c68406e39f48550434faeef3277eba"
Fixed #22750, #22248: Model renaming now also alters field FKs
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:5>
Comment (by Andrew Godwin <andrew@…>):
In [changeset:"b568bdf8da30fe5940a31add9f3a2b8029ecb04d"]:
{{{
#!CommitTicketReference repository=""
revision="b568bdf8da30fe5940a31add9f3a2b8029ecb04d"
[1.7.x] Fixed #22750, #22248: Model renaming now also alters field FKs
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:6>
* cc: stratoukos (added)
* status: closed => new
* resolution: fixed =>
Comment:
Although this seems to be fixed by b568bdf, RenameModel.reversible is
still False making RenameModel unreversible.
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:7>
* has_patch: 0 => 1
* stage: Accepted => Unreviewed
Comment:
I've made a pull request for this:
https://github.com/django/django/pull/3572.
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:8>
* stage: Unreviewed => Accepted
Comment:
The '''Triage State''' refers to the ticket and not the patch.
Having '''Has patch''' checked with '''Patch needs improvement'''
unchecked will ensure your patch shows up in the review queue.
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:9>
Comment (by stratoukos):
Sorry about that, this is my first code contribution to Django. I'll keep
it in mind for the future.
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:10>
* cc: info+coding@… (added)
* needs_better_patch: 0 => 1
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:11>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"cf7a2a000e16b86dd721a021f1a2001529d8d707"]:
{{{
#!CommitTicketReference repository=""
revision="cf7a2a000e16b86dd721a021f1a2001529d8d707"
Fixed #22248 -- Made RenameModel reversible
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:12>
Comment (by Tim Graham <timograham@…>):
In [changeset:"50434aebe2d3307263ca55f6dd9fa7ace2f87d8f"]:
{{{
#!CommitTicketReference repository=""
revision="50434aebe2d3307263ca55f6dd9fa7ace2f87d8f"
[1.7.x] Fixed #22248 -- Made RenameModel reversible
Backport of cf7a2a000e from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22248#comment:13>