Re: How do I connect postgres table structures and view structures to an existing svn repository? - Mailing list pgsql-general

From Vivek Khera
Subject Re: How do I connect postgres table structures and view structures to an existing svn repository?
Date
Msg-id 5B38900D-A6BF-412D-8AA3-CAB55040951A@khera.org
Whole thread Raw
In response to Re: How do I connect postgres table structures and view structures to an existing svn repository?  (Richard Huxton <dev@archonet.com>)
List pgsql-general
On Aug 1, 2007, at 10:56 AM, Richard Huxton wrote:

> You could write a small cron-script that dumped the schema once
> every 5 minutes so it could be picked up by svn.
>
> I think most people have a separate collection of schema-creation/
> update scripts that they keep under version control. All changes
> are then through running these.
>


You would have to do it via polling, since schema changes cause no
events to be generated (ie, you can't attach a trigger to a schema
change.)

But the *right* way is to make schema change scripts as "delta"
files, add them to your repo, test them on your staging environment,
then apply them to your production environment.  That way you can
reconstruct your DB at any time and *know* it will work.


pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: truncate transaction log
Next
From: "Mason Hale"
Date:
Subject: Re: pg_dump of only the structure from a client such as ruby