#24686: Support for Moving a model between two Django apps
-----------------------------+------------------------------------
Reporter: cancan101 | 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 MarkusH):
Referring back to the [http://stackoverflow.com/a/26472482 example
solution from SO]:
As soon as you remove the `old_app` from installed apps and apply the
migrations on an empty database the `SeparateDatabaseAndState` operation
in `new_app` will **only** create the model in memory but **no database
table**. Therefore it's not an option to migrate data between apps to get
rid of one app it this simple form.
Replying to [comment:4 cancan101]:
> Crazy question, but what about project level migrations?
What about them? You can define `settings.MIGRATION_MODULES` and put all
app migrations in your project. But I advice you to not do that unless
there is a 3rd party app that doesn't have Django migration support. Then
this is the way to go to add migrations for that particular app.
Replying to [comment:3 knbk]:
> I do have some concerns about dependencies. If the migration lives in
the old app, the autodetector won't be able to detect that the next
migration in the new app depends on the `RenameModel` migration in the old
app. Likewise, if the migration lives in the new app, the next migration
in the old app won't have a dependency on the migration that moves the
model. The last case ''might'' not be a problem, but I can't say that off
the top of my head.
Sounds about right to me. You will eventually run into a hellhole of
dependencies.
--
Ticket URL: <https://code.djangoproject.com/ticket/24686#comment:5>
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.4d150f4b79920797c9b1529b44c4566f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.