Re: Re: SQL Source Control

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

 



2007. 04. 11, szerda keltezéssel 16.19-kor Colin Guthrie ezt írta:
> 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.

yeah I have the same problem ;)

I have two kind of SQL files:
1) SQL of the complete, blank DB structure - I store it for each main
version (I should store it for each version if I wouldn't be so
lazy... ;) )
2) SQL instructions to upgrade from a DB version to another - I need
these to upgrade working databases

however I have no real solution for rollback, and if something is broken
in a new version and I have to revert a working DB to an older state,
well that's real serious trouble (and usually a lot of cursing and stuff
like that)....

so, if anyone has a good solution I also would like to hear it :)

greets
Zoltán Németh

> 
> Col
> 

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