#25771: Serialization of natural foreign key in migration scripts does not work
-------------------------------------+-------------------------------------
     Reporter:  bowensong            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Uncategorized        |                  Version:  1.8
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  database migration   |             Triage Stage:
  serialization                      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by bowensong):

 OK, my problem was because I'm using the elasticsearch
 ([https://www.elastic.co/products/elasticsearch]), and elasticsearch uses
 JSON format.
 In the normal use case, elasticsearch being updated by the `post_save`
 signal, but in the event of data migration, the `post_save` function is
 not being called. In that case, I have to do the elasticsearch update in
 the migration script, and this didn't work because the natural key issue,
 I got wrong (unexpected) data in the JSON.
 If you are not going to fix it, would you able to provide any suggestions
 about how to do this in a correct way?

--
Ticket URL: <https://code.djangoproject.com/ticket/25771#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/067.222b17771cffa7e05f17c8ee4144ca01%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to