Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django syncdb and an updated model

I have recently updated my model, added a BooleanField to it however when I do python manage.py syncdb, it doesn't add the new field to the database for the model. How can I fix this ?

like image 766
Hellnar Avatar asked Oct 22 '09 08:10

Hellnar


1 Answers

From Django 1.7 onwards

Django has built in support for migrations - take a look at the documentation.

For Django 1.6 and earlier

Django doesn't support migrations out of the box. There is a pluggable app for Django that does exactly that though, and it works great. It's called South.

like image 142
Dominic Rodger Avatar answered Sep 29 '22 16:09

Dominic Rodger