#26488: migrate crashes when renaming a multi-table inheritance base model
-------------------------------------+-------------------------------------
Reporter: Christopher | Owner: nobody
Neugebauer |
Type: Bug | Status: new
Component: Migrations | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by kesterlester):
Replying to [comment:5 Tim Graham]:
> As reported in #28243 (closed as duplicate), after
ecd625e830ef765d5e60d5db7bc6e3b7ffc76d06, the error is now something like
"FieldError: Auto-generated field 'a_ptr' in class 'B' for parent_link to
base class 'A' clashes with declared field of the same name."
Ah - such a relief to find this bug report! ~24 hours ago I hit this
problem in my first django project. Being a newbie I presumed I was doing
something wrong and have been trying all sorts of things (without success)
to allow me to rename a base class without losing all the data that's now
in my database. I'll leave the renaming issue alone now and await a
patch. I don't feel anywhere near experienced enough yet to try to patch
things myself, but maybe later?
In agreement with Tim's comment I see:
{{{ jango.core.exceptions.FieldError: Auto-generated field 'content_ptr'
in class 'Answer' for parent_link to base class 'Content' clashes with
declared field of the same name. }}}
as a result of me trying to rename a multi-table inheritance base class
(having no non-automatic fields) from name "Content" to something else,
when class Answer derives from Content.
--
Ticket URL: <https://code.djangoproject.com/ticket/26488#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.5d15f5833b6b38428d72a910c5291f77%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.