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

Re: Using SVN for web applications made with PHP / MySQL?

From: Toby Johnson <toby_at_etjohnson.us>
Date: 2004-12-16 20:59:32 CET

Ryan Schmidt wrote:

> Is it for example possible to have the SVN server do something
> (execute a shell script...) automatically on check-in, so that we
> could have the copies made immediately instead of there being an
> X-minute delay?

Yes, see "Hook Scripts" in chapter 5 of the manual. The easiest way
would be to have a SVN working copy of the website in your "development"
area, then after every commit your server does an "svn update" on that
development working copy.

>
> * The application has a database behind it. How do I track changes to
> that?

This is much trickier. I'm not familiar with the MySQL backend file
structure, but it does seem that the data is kept separate from the
schema. So you could conceivably version-control only the schema files,
but unless this format is published by MySQL, you're probably not
"allowed" to depend on their layout meaning what you expect it to, and
mucking around with those files could very well break your database.

A much simpler solution would be to version-control a file which created
the schema from scratch (i.e. the output of "SHOW CREATE TABLE", etc.).
You could have a shell script which developers run every time they
change the schema, which re-creates these files and checks them in. Of
course, in this scenario your "live" database wouldn't be
version-controlled but at least you'd be able to see when and by whom a
particular change was made.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 16 21:03:46 2004

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.