Re: Schema version control - Mailing list pgsql-general

From Andy Chambers
Subject Re: Schema version control
Date
Msg-id op.vqpmtolxcqhz04@vaio.mcnaitdept
Whole thread Raw
In response to Re: Schema version control  (Bill Moran <wmoran@potentialtech.com>)
List pgsql-general
On Thu, 10 Feb 2011 17:59:30 -0500, Bill Moran <wmoran@potentialtech.com>
wrote:

> The overview:
> You store your schema and data as XML (this is easy to migrate to,
> because
> it includes a tool that makes the XML from a live database)

We're doing a similar thing here except we're a Lisp shop so our
schema is defined as a set of "defentities" and we can migrate from
one version to another using a corresponding set of "defmaps".

> Keep your XML schema files in some RCS.
> When it's time for a new deployment, you run the dbsteward tool against
> the schema XML and it turns it into DDL and DML.
> When it's time for an upgrade, you run the dbsteward tool against two
> schema XML files, and it calculates what has changed and generates the
> appropriate DDL and DML to upgrade.

This sounds pretty cool.  Ours doesn't do that yet but that's next
on my TODO list.

--
Andy Chambers

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Schema version control
Next
From: Bill Moran
Date:
Subject: Re: Schema version control