For our Ruby on Rails app, during development, we're using SVN to store and
sync a group of SQL load files,
containing all the delete, insert and update commands necessary to fully
populate the database.
After doing an SVN update we then run a shell (or batch) script to pipe the
SQL files into MySQL.

You can use mysqldump to create your starting point load files, assuming you
already have some content.

It works well, provided you're willing to make updates to the SQL files
only.  Once we go live we plan to batch/script the mysqldump process as well
to keep things up to date.

Dan


On 9/13/06, Chris <[EMAIL PROTECTED]> wrote:

Graham Anderson wrote:
> Is anyone using subversion to sync live and development databases?
>
> If so, how?
> Is this desired or a best practice?
>
> Everything except my databases are under version control.
> In theory, I would like my databases to sync with the same subversion
> 'svn update' command.
> That way, all web content updates with one command.

You mean schemas or the actual data?

I wouldn't do that for data - if you create a "page" in your cms on your
live system, you'd kill it off by doing an update.

Doing a schema, sure, but data - no way.

You'd need a script of some sort to handle database changes (eg
adding/removing columns/indexes), no version control system will do this
for you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


Reply via email to