Re: [PHP] SQL Source Control



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?
.



Relevant Pages

  • Re: Questions to discover a php guru
    ... world and not too much familiar with the platform. ... Proficient with MySQL ... I'm by no means a php "developer", but I have built a site "from ... How do you backup mysql databases? ...
    (comp.lang.php)
  • Re: DB newbie needs suggestions for bsd-based {db + frontend} ports
    ... MySQL on FreeBSD 4.10-RELEASE and I'm making steady progress. ... threading problems in combination with PHP. ... Filemaker, but I did some work in MS Access.. ... databases will assume MySQL. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Need Your Opinions
    ... company, I also mean real company databases, not just online databases. ... The process and the languages involved in developing this system has to be ... have some foregone and equally unfounded misgivings about php and/or mysql. ...
    (comp.lang.php)
  • new rc.d style & ordering
    ... > such as databases, if they are installed? ... > php and mysql, I want mysql to be started before apache. ...
    (freebsd-current)
  • Re: [PHP] Getting mysql_query results into an array
    ... loop through mysql result set to build $array ... perform some kind of calculation upon $array ... Databases are highly optimized for this kind of thing, ... query is nasty and the PHP is fast and easy, ...
    (php.general)

Loading