Hi, ok my questions is how to create a data migration, populating the FK
data??.
 my old data no have fk only content_type and object_id for my relations
with
my class ModelMain,
 if fk = object_id?? or content_type?

thank

On Mon, Sep 29, 2014 at 6:23 AM, Tom Christie <christie....@gmail.com>
wrote:

> You'll probably want to take this approach:
>
> * Create a schema migration, adding the FK.
> * Create a data migration, populating the FK data.
> * Create a schema migration, removing the GFK.
>
> On Sunday, 28 September 2014 23:15:22 UTC+1, sacrac wrote:
>>
>> Hi, is posible to change GenericForeingnKey to ForeignKey without losing
>> data?
>>
>> any link to explain the trick?
>>
>> I have an old application with GFK but now I want to FK moment but I will
>> not lose data
>>
>> this is example my models old and below the new models
>>
>> http://pastebin.com/ym6Scrmd
>>
>> Cheers
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3730a43f-b926-48d4-be5f-5bcfa2914220%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/3730a43f-b926-48d4-be5f-5bcfa2914220%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-7rO0Dd3F_NUwHmEMy1QYJjwCjsAqG8dWd7jNNA-zHwJzJ-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to