#24686: Support for Moving a model between two Django apps
-------------------------------+------------------------------------
Reporter: Alex Rothberg | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by Florian Klink):
I also ran into this today, when pulling some models into a separate app.
The [http://stackoverflow.com/questions/25648393/how-to-move-a-model-
between-two-django-apps-django-1-7/26472482#26472482 stackoverflow post]
does not work anymore as soon as there are cross-app foreign keys, but
[http://stackoverflow.com/questions/30601107/move-models-between-
django-1-8-apps-with-required-foreignkey-references/30613732#30613732 this
example here] does.
In the solution outlined there, a migration inside the new app depends on
a migration of the old app
([https://github.com/halfnibble/factory/blob/step4/tires/migrations/0001_initial.py#L11
see here]), so loading all migrations should at least break as soon if you
remove the old app from INSTALLED_APPS ;-)
Given the currently needed amount of manual work, we should really try to
detect these movements and produce migrations like above.
--
Ticket URL: <https://code.djangoproject.com/ticket/24686#comment:8>
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.2c9ba09156f494cacb637aef0ca2725d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.