#23657: Migrations framework doesn't properly handle factory-generated base
classes.
----------------------------+--------------------------------------
Reporter: jfialkoff | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by carljm):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
This strikes me as an atypical edge-case where the only feasible answer is
"modify the generated migration." Migration files are editable Python code
for a reason; autodetection will never handle everything someone might do.
In this case, I don't think it is possible for the autodetector to handle
this the way you want - it can't know via runtime introspection that your
base class was created via factory. (Well, with `__qualname__` in Python 3
it might be possible, but we have to maintain Python 2 compatibility for
quite some time still).
Closing wontfix; if any other core dev with more hands-on migration
experience disagrees, feel free to reopen.
--
Ticket URL: <https://code.djangoproject.com/ticket/23657#comment:1>
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/067.6fc6b20208e3f9befaed79bc2e134250%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.