Is there a good way to check database structure into a SVN? Perhaps checking in a DDL file when changed?

Any ideas?


Sure, but unless it's strictly a development database you'll probably also include some data-migration routines between versions. You'll want to be able to have complete freedom to drop columns, which means you'll want to be able to bring everything back later if design requirements require them. For a better illustration of what I mean, check out how Rails handles migrations.

Marcel Levy
+6  A:

I've never done it, but one of those might answer your question (not sure, haven't read them thoroughly)


Maintaining a DDL script that can create the database from scratch, including default data is working for me right now. It makes it pretty easy to generate smaller upgrade scripts from revision to revision when necessary with a simple diff.