[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

versioning a [small] MySQL database with svn?

From: Basile STARYNKEVITCH <basile_at_starynkevitch.net>
Date: 2005-02-27 18:03:53 CET

Dear All,

The documentation mentions start-commit & pre-commit hooks etc...
See http://svnbook.red-bean.com/en/1.1/ch05s02.html#svn-ch-5-sect-2.1

It seems to me that these hooks could be used to version a
database. For instance, suppose that my SVN-managed project Foo
contains not only files like Foo/main.c and Foo/foo.h but also a small
MySQL database foo_db

Then I would want to manage a Foo/foo_db.sql file, provided that
before each commit the SubVersion system runs the command
   mysqldump foo_db > foo_db.sql
inside the versioned working copy

It seems to me that having this command inside my start-commit script
is not enough. (and I would like to manage the script thru SVN and
have it automagically installed as a hook).

I believe that this is a common scenario that one want to version a
file produced by a command (be it a RDBMS dump, or an HTTP client like
wget, or a GDBM dump...) and to ensure that the SubVersion system
produces this file (by running this command) before commits.

I'm a bit surprised that such a scenario is not explicitly appearing
in the documentation. Either I misunderstood something (most probably)
or maybe something is lacking in the documentation or the SVN
software.

Any clues or insight please?

Thanks for reading. Regards.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net 
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Feb 27 18:06:12 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.