For example:
{{{
class Author(models.Model):
real_name = models.CharField('name', max_length=50)
class Pseudonym(Author):
pseudonym = models.CharField('name', max_length=50)
class Book(models.Model):
author = models.ForeignKey(Author)
}}}
If the class Pseudonym is renamed then later migrations will ''always''
attempt to reset the author field on book.
This is already fixed on 1.8 and master.
--
Ticket URL: <https://code.djangoproject.com/ticket/24354>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Please see https://github.com/django/django/pull/4155 for a fix
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:1>
* has_patch: 0 => 1
* type: Uncategorized => Bug
Comment:
Mark as having patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:2>
Comment (by timgraham):
Bisect the fix on master/1.8 to b29f3b51204d53c1c8745966476543d068c173a2.
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:3>
Comment (by MatthewWilkes):
I'm sorry, are you asking me to bisect the current state or saying though
found that commit from bisecting?
Either way, that's right. That PR fixes the issue and it was present on
master immediately prior to it being merged. I know this because that's
where I originally fixed it, and had to change my PR to target 1.7 as
MarkusH's PR landed while I was working in it.
He advised that the changes on 1.8 would not be back ported to the 1.7
line.
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:4>
* stage: Unreviewed => Accepted
Comment:
Sorry, I had a typo in my earlier comment; edited to fix it and reviewed
your PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:5>
* stage: Accepted => Ready for checkin
Comment:
Looks good to me, hopefully a migrations expert can give a final +1.
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:6>
* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:7>
Comment (by MatthewWilkes):
I have made the requested changes and updated the pull request. Sorry for
the slow!
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:8>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"d0607a7eee75121527cd03c89de82a222e298eae" d0607a7e]:
{{{
#!CommitTicketReference repository=""
revision="d0607a7eee75121527cd03c89de82a222e298eae"
[1.7.x] Fixed #24354 -- Prevented repointing of relations on superclasses
when migrating a subclass's name change
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:9>
Comment (by Tim Graham <timograham@…>):
In [changeset:"ae87ad005f7b62f5fa5a29ef07443fa1bbb9baf0" ae87ad0]:
{{{
#!CommitTicketReference repository=""
revision="ae87ad005f7b62f5fa5a29ef07443fa1bbb9baf0"
Refs #24354 -- Prevented repointing of relations on superclasses when
migrating a subclass's name change
Forwardport of test and release note from stable/1.7.x
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:10>
Comment (by Tim Graham <timograham@…>):
In [changeset:"22a67d22e98c86fe4b1665c97ace6f4251a99cac" 22a67d22]:
{{{
#!CommitTicketReference repository=""
revision="22a67d22e98c86fe4b1665c97ace6f4251a99cac"
[1.8.x] Refs #24354 -- Prevented repointing of relations on superclasses
when migrating a subclass's name change
Forwardport of test and release note from stable/1.7.x
Backport of ae87ad005f7b62f5fa5a29ef07443fa1bbb9baf0 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:11>
Comment (by Markus Holtermann <info@…>):
In [changeset:"e4b7daec11c3849f5dae46ddfad5fe9ef03c2482" e4b7daec]:
{{{
#!CommitTicketReference repository=""
revision="e4b7daec11c3849f5dae46ddfad5fe9ef03c2482"
Refs #24354 -- Prevented repointing of relations on superclasses when
migrating a subclass's name change
The issue was hidden on 1.8+ until #24573 due to a bug inside the model
reloading process.
Forwardport of patch from ae87ad005f7b62f5fa5a29ef07443fa1bbb9baf0
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:12>
Comment (by Markus Holtermann <info@…>):
In [changeset:"697317f3340b1d1f40586262098ad4dbae9aebaf" 697317f]:
{{{
#!CommitTicketReference repository=""
revision="697317f3340b1d1f40586262098ad4dbae9aebaf"
[1.8.x] Refs #24354 -- Prevented repointing of relations on superclasses
when migrating a subclass's name change
The issue was hidden on 1.8+ until #24573 due to a bug inside the model
reloading process.
Forwardport of patch from ae87ad005f7b62f5fa5a29ef07443fa1bbb9baf0
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24354#comment:13>