Re: How do I connect postgres table structures and view structures to an existing svn repository?

From: Vivek Khera <vivek(at)khera(dot)org>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do I connect postgres table structures and view structures to an existing svn repository?
Date: 2007-08-07 15:54:29
Message-ID: 5B38900D-A6BF-412D-8AA3-CAB55040951A@khera.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mason Hale 2007-08-07 16:18:09 Re: pg_dump of only the structure from a client such as ruby
Previous Message Scott Marlowe 2007-08-07 15:47:42 Re: truncate transaction log