[Django]-(Python/Django): How do I keep my production db in sync (scheme and data) and with dev pc db?


This seems like a strange workflow for me. Wouldn’t it be much better to import the data in the production database and then just sync it with your development db from time to time?
IMO, the development machine shouldn’t be included in the production data workflow.

That’s the way I do it using fabric. I’ve written a simple function which copies part of the production db onto the local development machine.



South is a great tool for dealing with database migrations in Django projects. The latest release now supports both schema and data migrations


The app provides a number of management commands which allow you to dump executable files which when run can alter the database schema or insert records. It’s great for automating changes to a production environment or when working on a team. You could then use something like fabric (or do it manually if you must) to push up the migration files and run the migrate command to populate your database

Leave a comment