Hi All,
this is my first schemamigration and it is done on Django 1.6 with south.
I have a model class 'book' which derives from 'media' and extends it.
Now I decided that this splitting is not needed. Therefore I decided to merge the data from 'media' into 'book'
My idea was to keep the table 'book' and just add all attributes from 'media' to it in the models.py.
But as I understand the datamigration, I still need the book.media_ptr for migrating the data to the table book.
But if my model class 'book' still derives from 'media' and I run the schemamigration I get the following error:
FieldError: Local field 'price' in class 'book' clashes with field of similar name from base class 'media'
Is it needed to do a mutli-step migration like below or is there another possible solution???
Point 1. I do because I do not have a initial migration.
1.) manage.py convert_to_south myApp
2.) change models.py by adding the fields from media to book model, but name them with <fieldName>_tmp
3.) manage.py schemamigration myApp --auto
4.) manage.py datamigration myApp merge_from_media
5.) change the models.py to rename the book model by removing the _tmp
6.) manage.py schemamigration myApp --auto
Thanks for hints
Regards
Marcel