9👍
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:
- Drop the tables that changed and perform syncdb again. This is reasonnable when you are developing your application and you don’t have any real data in your database.
- Use a migration tool like South that performs database migration (like hibernate update script).
- Edit the database by hand and add/delete the appropriate fields for the previously existing tables.
4👍
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…
2👍
Just to expand on @Barthelemy’s answer, there are several Django migration tools:
- South
- Deseb
- django-evolution
- dmigrations (MySQL only)
- nashvegas
- yadsel
Source:stackexchange.com