Mysql – Django – Moving database from development to production servers

djangoMySQL

I am working on a Django project with a MySQL backend. I'm curious about the best way to update a production server's database to reflect the changes made on the development server's database?

When I develop now, I make some changes to a models.py file, then to a schemamigration using South. Sometimes I do several migrations across several apps within the main project folder before it's ready for the production database. This means that there are several migration files in the app/migrations/ folder created by South.

So on the production server, how does one update the database to reflect all the changes made in development, without having any data loss?

Best Answer

You need to creation migrations. South is probably most people's go to app in the Django world

http://south.aeracode.org/

Related Topic