#24686: Support for Moving a model between two Django apps
-------------------------------+------------------------------------
     Reporter:  Alex Rothberg  |                    Owner:  Bhuvnesh
         Type:  New feature    |                   Status:  assigned
    Component:  Migrations     |                  Version:  dev
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------

Comment (by Bhuvnesh):

 Hi Maarten!
 I don't think moving the model code to the new django app and setting the
 app_label to point to the old django app will work. The auto detector will
 see it as the deletion of model in the old app and creation of that model
 in the new app. This will also lead to losing all the data associated with
 that model.
 There is a [https://github.com/django/django/pull/16905 PR] open for
 addressing this issue which was working pretty good when the last time I
 tested it. I would suggest switching to that branch and try the same you
 suggested above (if possible) and it should work fine without any data
 loss. You can also have a look at the working of this new feature
 [https://github.com/DevilsAutumn/moving-model-demo#10-moving-model-by-
 just-changing-app_label-in-models-meta here.] Let me know if you face any
 problem.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/24686#comment:34>
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/0107018c77c7be82-04e81164-0b46-48e9-9f1e-ed451a0bd079-000000%40eu-central-1.amazonses.com.

Reply via email to