#24778: Data Migration from Fixture
-----------------------------+-----------------------------------------
     Reporter:  9gix         |                    Owner:  nobody
         Type:  New feature  |                   Status:  new
    Component:  Migrations   |                  Version:  master
     Severity:  Normal       |               Resolution:
     Keywords:               |             Triage Stage:  Someday/Maybe
    Has patch:  1            |      Needs documentation:  1
  Needs tests:  1            |  Patch needs improvement:  1
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+-----------------------------------------
Changes (by MarkusH):

 * needs_better_patch:  0 => 1
 * stage:  Unreviewed => Someday/Maybe
 * needs_tests:  0 => 1
 * needs_docs:  0 => 1


Comment:

 I'm a bit torn about this feature. I can understand peoples request to
 easily load (existing) fixtures. It's convenient. On the other hand this
 will inevitably lead to the very same problem we wanted to prevent by
 using `RunPython` in its intended form:

 {{{#!python
 MyModel = apps.get_model('myapp', 'MyModel')
 MyModel.objects.create(...)
 }}}

 Apart from that, as soon as a model changes your `LoadFixture` operation
 will fail: `call_command` will use the model `myapp.models.MyModel`
 whereas the database has an older state because the respective changes to
 the database would happen in "0003_add_somefield".

--
Ticket URL: <https://code.djangoproject.com/ticket/24778#comment:3>
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/062.5ce48edb1e390fab6af3825ae961216b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to