#21893: Migrations RunPython operations seem to trip on MTI models.
----------------------------+---------------------------------------
Reporter: loic84 | Owner:
Type: Bug | Status: new
Component: Migrations | Version: 1.7-alpha-1
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 loic84):
I've looked into this further, the problem wasn't how the system dealt
with the migration that I've reproduced in the test case, but how I ended
with this migration to begin with.
I have abstract models that inherit from concrete models to add python
level functionality.
The problem is that these are ruled out by:
https://github.com/django/django/blob/master/django/db/migrations/state.py#L162.
Fixing this condition doesn’t help because `Apps.get_model()` do not
support abstract models and that's what `ModelState.render()` uses:
https://github.com/django/django/blob/master/django/db/migrations/state.py#L203
I’m not sure what’s the best course of action, something specific to
migrations, or a fix at the app registry level, maybe `include_abstract`
akin to the existing `include_auto_created`, `include_deferred`,
`include_swapped`.
--
Ticket URL: <https://code.djangoproject.com/ticket/21893#comment:2>
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/064.3b46b851477a3609d3c0fed9eb33e685%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.