In development, whenever I make changes to the underlying model in my Django application, I'm used to:
Once deployed using WSGI & Apache, however, I don't have the development server running. As such, I don't know how to stop the server, and just running:
$>python manage.py syncdb
didn't appear to update the underlying MySql database that instantiates the model. So, short of tearing down the entire instance, how do I update my database?
Note: I implemented this before I learned about db migrations using "south" so I'm looking at raw Django, I suspect.
Django doesn't have a migration framework built-in (yet!), so there's no such thing as "raw django for migrations".
Consequently, you either do that manually (using SQL to alter the table), or you use south.
Now, my recommendation would be to use south
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.