Reputation: 4003
I have added and removed fields in my models.py file and then run manage.py syncdb. Usually I have to quit out of the shell and restart it before syncdb does anything. And then even after that, I am getting errors when trying to access the admin pages, it seems that certain new fields that I've added still don't show up in the model:
Caught an exception while rendering: no such column: mySite_book.Title
Upvotes: 3
Views: 3441
Reputation:
For me, (so long as you're doing this with test data, and not doing this in a production environ) it's alot easier to just blow away the test.db and do a new ./manage.py syncdb. Just food for thought...
Upvotes: 4
Reputation: 36832
Just to expand on @Barthelemy's answer, there are several Django migration tools:
Upvotes: 2
Reputation: 8757
Django does not perform database migration for you, i.e., if you add new fields, Django won't modify your database schema.
You can either:
Upvotes: 9