#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 wtayyeb):

 Hi, I have add a method  to `MigrationAutodetector` to let it find moved
 models, originally as a fork of `.generate_renamed_models()`. It will
 create at least 2 migrations with `SeparateDatabaseAndState` to do the
 job.
 i have create a [https://github.com/django/django/pull/11920 PR] for it. I
 try not to alter anywhere else in `MigrationAutodetector`, maybe others
 could do it better without this constrain.

 I have only one problem, I need to mention the migration of rem_app_label
 ( commented in PR ) just before new created one ( which I create ).
 without it forward plan may works, but backward plan may be incorrect
 leading to broken backward migration or even data loss.
 Adding it manually is not an acceptable answer for Django project.

 I dig in code but couldn't find it. anyone can help me?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/24686#comment:12>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.4fa6ccb14f125bbc4c0239b87bab61a8%40djangoproject.com.

Reply via email to