Re: SQL Source Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, April 11, 2007 10:13 am, Richard Davey wrote:
> I know a lot of you use various means for PHP source control (CVS,
> SVN,
> etc), which is all well and fine, but how do you manage source control
> on your databases?
>
> Say you've got an upgrade to a site, all of the new PHP files are
> controlled by SVN, so you can rollback at any time, but say the
> upgrade
> includes several key modifications to a MySQL table and perhaps the
> changing of some core data.
>
> How (if at all?!) do you handle the versioning of the database and
> data
> itself, so you can keep both PHP and SQL structure in sync?

Good thread!

Though perhaps a MySQL list would have more insight...

I wonder if perhaps some larger-scale sites might not just buy a whole
'nother DB server, and flip the connection line to the "new" one...

Granted, you lose all new data if you have to revert, but at least you
know you have a valid state to revert to...

Kinda pricey, but there it is.

I suppose the other thing I do that hasn't been mentioned is plan my
DB schema a bit farther out than my PHP code, so that I've got new
empty unused fields/tables sitting there, and not doing any harm, but
that I can add features without worrying that they won't work.

I've done this successfully a couple times for simple stuff, but it
usually won't work for anything remotely complex, as I don't
anticipate the DB needs correctly.

Still, better to have an unused "Future Tech #1" field if you know
you'll need it than to try to add it at the last minute when you do
need it, for simple stuff.

I suppose one could do a mysql dump of at least the schema and svn
that...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux