Re: Migration of db

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: akp geek <akpgeek(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Migration of db
Date: 2009-12-31 21:22:53
Message-ID: dcc563d10912311322k35b0752i1aeb3b8a0428ecef@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Dec 31, 2009 at 1:45 PM, akp geek <akpgeek(at)gmail(dot)com> wrote:
> Hi All -
>           We have 2 databases test and prod. Now they are out of sync ( of
> course they will be to some extent ). But there are some functions in some
> schemas. we have to sync from prod to test. What I wanted to ask, is there
> any tool that you recommend for version control. Because we are having tough
> time tracking the changes

I've used the poor man's version control in the past. Make a table:

create table version_control(id numeric primary key, description text,
applied timestamp default now());

And then in every bit of DDL you submit to the DB, you put a single
line at the top to insert the proper values to identify it. Then you
can just compare the various dbs' version_control tables to see what's
missing etc. Assuming you don't let tom, dick, harry and all their
friends run ddl on the prod / staging / qa databases and pay attention
to what you're doing it should work well.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2009-12-31 22:53:13 Re: Query very slow when in plpgsql function
Previous Message Thom Brown 2009-12-31 20:51:06 Re: Migration of db