Re: New field in django
On 10/09/2013 3:28pm, Harjot Mann wrote:
> On Mon, Sep 9, 2013 at 10:59 AM, Xavier Ordoquy <xordoquy@linovia.com> wrote:
>> The message is: "Table 'tcc_report' already exists"
>>
>> This means that you already created the tables with syncdb which bypassed south and you're trying to created them again with south.
>> You'll be able to recover from this by:
>> - ensuring your models are in line with your current DB schema
>> - creating an initial migration (provided that you didn't already create migrations)
>> - fake the initial migration to tell south you already created the schema for this application
>>
>> Then you can change your models, create schema or data migrations and apply them.
>>
>> For more information, have a look at http://south.readthedocs.org/en/latest/convertinganapp.html#converting-other-installations-and-servers
>
>
> Nothing is working. Please tell me how we can change the data-type of
> any field. I urgently need to do this. I tried south, it didn't work.
> What should I do?
I haven't been following this conversation so I might not be helping
here. But maybe ...
1. Take a backup of all your models just in case.
2. Adjust all your models so they exactly match the tables as they
currently stand
3. Delete all your South migration data in app sub-directories
4. Drop all the South tables
5. Remove South from INSTALLED_APPS
6. Run manage.py syncdb to prove there are no errors in what is left. It
is possible that will clean South out of your content_type but I'm not
sure about that. If so it doesn't matter.
7. At this point you have a system ready for South to be installed so go
ahead and do that according to the South docs
8. Follow the South docs to create the intial migration
9. Adjust your models one change at a time and migrate each one
successfully before tackling the next one. Stop when your models match
the backup from step 1.
Good luck
Mike
>
--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home