This is not exactly about Subversion, more about open source SCM in
general, but I still hope you find this interesting.
I've been working on a large project that uses an Oracle database
extensively. We have a trunk and a branch for each version which we
release every several months and each time we do that we update the
client database installations with the changes that we've made to the
tables, indexes, functions, triggers, etc..
To manage all those database changes we've been keeping scripts that
create the schema, in Subversion, right next to the source code files
and we've been updating those scripts frequently as the structure of
the DB changed. Those scripts let us build a fresh database of the
correct version, but unfortunately they can't convert an existing,
installed database to fit a new version of our software. For that we
have update/alter scripts that run commands to add columns, remove
columns and otherwise change the structure of the database - for each
version upgrade. Over the years we've been through more than a few
long, sleepless nights trying to find why some installations worked
and others didn't and what exactly was not in sync between different
production databases. At the end of the night, among a stack of empty
pizza boxes, we'd discover that someone had forgotten to add a certain
change to an update script or some similar human error.
I've been looking all over the place for a solution for this problem -
the management of database versions. I wanted an actual source control
tool for our database, something we could use to easily and
transparently upgrade the version of our schemas and manage the
history off those changes. And couldn't find anything to fit my needs.
So I started working on a tool myself, hoping I'm not reenventing the
If any of you have encountered the same problems I have and struggled
to create your own tools and methodologies to manage your databases,
you might find this tool, called Daversy (Database Versioning System),
usefull as well..
I thought that if I could represent a database structure as an XML
file and store it in Subversion, I'd have source control for the
database with all the benefits of a real source control tool. After
all, XMLs are just text files and Subversion handles those very well.
Of course there's the issues of generating DDL commands from an XML
file and of comparing two such files to create update/alter scripts,
but the basic idea sounded simple enough.
I've worked on this for a while and I've got a working prototype now.
If you're at all interested, you can download it from www.daversy.org.
There's a tutorial there as well, to get you started.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Thu Oct 27 00:32:39 2005