Re: SQL Source Control

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

 



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?
>
> Cheers,
>
> Rich


One thing we do is add a table called 'versions' to each application,
this table just has one row and a column for the schema version (and
sometimes other stuff less important.)

When the app runs it checks to ensure that its defined constant
DBVERSION matches that of the database it is running against.  This has
actually helped out more than once, though not a solution to the actual
problem.

Travis Doherty

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