Re: schema change tracking

From: Steve Atkins <steve(at)blighty(dot)com>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: schema change tracking
Date: 2019-05-16 16:50:01
Message-ID: 5743A1A5-A8DF-4463-9B00-0D87B32C622D@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On May 16, 2019, at 5:41 PM, Benedict Holland <benedict(dot)m(dot)holland(at)gmail(dot)com> wrote:
>
> Hi All,
>
> I am fairly this question has many answers but here it goes:
>
> I need a tool that can track schema changes in a postgesql database, write scripts to alter the tables, and store those changes in git. Are there tools that exist that can do this?

If you're looking for something that'll reverse engineer schema change scripts from a database someone has made ad-hoc changes to ... try and avoid doing that if at all possible. Use the change scripts in git as the source of truth.

If you do that there are many answers, starting at "it's fairly easy to do yourself, with a simple schema version and upgrade / downgrade scripts". Depending on what language you're writing your app in there may be libraries that can help.

But if you're looking for something standalone, look at https://sqitch.org

Cheers,
Steve

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Susan Hurst 2019-05-16 16:50:39 Permissions for information_schema
Previous Message Benedict Holland 2019-05-16 16:41:22 schema change tracking