Re: SQL Source Control

From: Date: Wed, 11 Apr 2007 15:19:39 +0000
Subject: Re: SQL Source Control
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-252591@lists.php.net to get a copy of this message
Richard Davey wrote: > Hi all, > > 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? Yeah this is a weak point in my chain too! I keep database schema's in a file which can start with a blank db and create all the tables allowing for modifications and updates etc. over time with new deployments. But if something breaks... rolling back is well. a pain.... I could use a backup file and MySQL binary logs to replay to the point prior to deployment/update if the world depended on it, but this would take several hours to do and so I really wouldn't say I "relied" on this method.. it's more disaster recovery! Any suggestions in this area would be interesting. Col

« previous php.general (#252591) next »