[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: Rainer Müller <mueller_rainer_at_gmx.de>
Date: 2004-12-16 21:07:00 CET

Ryan Schmidt wrote:
> * We're used to having a web URL that is "the development version" of
> the project that we can look at. With a version control system, I'd
> check out the project, and then I'd have my own private URL for it where
> I could test the changes I'm making, but what happens when I check it
> in? How does it get to the "development version" URL? Do we have to have
> the equivalent of the "compile farm" which in our case would just do a
> checkout of the most current version to the development version htdocs
> folder every X minutes, or is there a better solution? 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, it is possible. SVN has hook-scripts, which get fired at special
events. So you could use a "post-commit" hook to checkout the project to

> * The application has a database behind it. How do I track changes to
> that? If I need to make a change to the database that's incompatible
> with existing code (like renaming a field) it would seem that I would
> need to "check out" a copy of the database (the pristine copy) and then
> a second copy that I could modify, so that later a diff could be done
> between them. But I don't know of a tool to do diffs of a MySQL
> database, and there's also the problem that the database in question is
> almost half a gig in size and growing. Making even just one copy of that
> will take a non-trivial amount of time, such that it would impede
> someone's workflow to wait for such a copy to finish. We're considering
> handling database updates the way we do now -- don't version control
> them, and make potentially incompatible changes very quickly so nobody
> notices. But since we're considering version control now for the PHP
> files, I wanted to see if there's a solution for the database too.

I don't know a good solution for that. I'm also working with SVN and
PHP+MySQL but we simply have a devel/mysql directory there the actual
mysqldump gets checked in.
Every developer has its own db installed at localhost and on changing
something in the mysql-structure it has to be announced in the log
messages. Maybe not the best way, but it works for us (3 persons).


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:28:00 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.