*Please try delete and recreate the database and do the syncdb again, * *if you are learning. **If you are in production, use South for django, for the schema migration.*
On Tue, Feb 15, 2011 at 10:06 AM, Chen Xu <[email protected]> wrote: > Hi, everyone: > I have a question about Django models, > so I created a Model: > > class Person(models.Model): > name = models.CharField(max_length=60) > > and ran the follwing: > > python manage.py syncdb > > this successfully did what I want, but later on, I added a new field into > a model > > class Person(models.Model): > GENDER_CHOICES = ( > (u'M', u'Male'), > (u'F', u'Female'), > ) > name = models.CharField(max_length=60) > gender = models.CharField(max_length=2, choices=GENDER_CHOICES) > > and I tried to run: > python manage.py syncdb again to sync my database, but it does not do it: > > So I am wondering if it is because since Person model already exists, it > will just simply ignore checking if the field changes. > And what I should do to sync the database? > > > Thanks > > > > > -- > ⚡ Chen Xu ⚡ > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Thanks and Regards, *Praveen Krishna R* -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

