views:

202

answers:

3

What are some options to avoid the latency of pointing local django development servers to a remote MySQL database?

If developers use local MySQL databases to avoid the latency, what are some useful tools to sync schema updates of the remote db with the local db and avoid manually creating, downloading, and loading dumps?

Thanks!

+1  A: 

One possibility is to configure the remote MySQL database to replicate to the developers local machine - assuming you have control of the remote database's configuration.

See the MySQL docs for replication notes. Using MySQL replication the remote node would be the Master and the developer machines would be Slaves. The main advantage of this approach is your developer machines would always remain synchronized to the Master database. One possible disadvantage (depending on the number of developer machines you are slaving) is a degradation in the remote database's performance due to extra load introduced by replication.

Strawberry
As far as I can see, this is the only way of doing this if you don't want to download dumps manually. The fact that it's the default method provided by MySQL themselves also suggests this should be the preferred approach.
ire_and_curses
A: 

It sounds like you want to do schema migrations. Basically it's a way to log schema changes so that you can update and even roll back along with your source changes (if you change a model you also check in a new migration that has up and down commands). While this will likely become an official feature at some point, there are several third-party solutions to choose from. It's really a personal preference, here are some popular ones:

Jon Gales
A: 

I use a combination of South for schema migrations, and storing JSON fixtures (or SQL dumps) of useful test data in the VCS repo for the project. Works pretty seamlessly.

Carl Meyer