Another alternative would be to access mysql from a shell and add the column
to the relevant table

mysql>> alter table xxxxx add column hits int(11) null;  for example




thinke365 wrote:
> 
> for example at first i have a model named url, the code is as follows:
> 
> class url(models.Model):
>      link=models.URLField(unique=True)
> 
> then i change this class as follows:
> 
> class url(models.Model):
>      link=models.URLField(unique=True)
>      hits=models.IntegerField()
> 
> at last, i use command  python manage.py syncdb
> 
> but was suprised to find that the schema of url table in the database
> is not changed
> 
> so is there any method to change the shcema of table using django command?
> 
> -- 
> 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.
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-change-the-schma-of-database-using-python-manage.py-syncdb--tp32288667p32288737.html
Sent from the django-users mailing list archive at Nabble.com.

-- 
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.

Reply via email to