RE: Subversion on Drupal
From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Fri, 12 Aug 2011 09:44:50 -0400
> My goal in learning Subversion was to put our web site under version control.
Versioning database schema changes and data changes is a challenge but not impossible.
BTW: svn does control binaries but not as well as text files.
There are tools to do db migrations where the migrations are scripts that modify your database. You source control the migration scripts and then your build/deploy process can run these migration scripts. Basically, it inspects the current "version" of the database and runs the appropriate scripts. If you really want to get fancy your scripts can migrate UP or DOWN version too... but usually not necessary to go down version in production.
You can also dump your database and put that in source control for dev. This way you can recover to any "version" but just loading up that dump.
We use a tool called DBGhost. It is for SQL Server only but it has a sync engine that will build the database from the source scripts and then compare that to the current live database and make the needed changes. It supports schema and data changes. It also allows you to control data changes by columns, so for example you can have a column in a table that specifies if the rows are "shipped" rows or customer rows and have it not touch the customer data.
Be creative and I'm sure you can come up with a way to revision your database changes. If you google "source control database" you will find lots of ideas and hints.
BOb
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.