On Fri, Jun 10, 2005 at 10:38:52AM -0500, Peter Fein wrote: > This is interesting... You'd want to be able to generate either a bunch > of CREATEs to create a schema from scratch or a 'patch' of ALTER > commands to move b/w arbitrary revisions or to a working copy (ie, a > live DB). This implies you need to store an intermediate (non-SQL) > representation in your repository (like the output of WBDiff mentioned > previously). I would think you would keep the CREATE scripts version controlled just as you do with your source code. It's text, after all that evolves linearly. You would tag them appropriately, say -1.0, -1.1, whatever. From those you can always generate two databases of version x and version x+y where X is the version in deployment and X+Y the schema version you want to migrate deployment to. >From *there* one would want to run a tool create_migration_script.sh --from=db1 --to=db2 which produces a patch script with appropriate ALTER statements. I *don't* think the patch scripts need to be kept in the versioning system. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match