Re: schema change tracking - Mailing list pgsql-general

From Steve Atkins
Subject Re: schema change tracking
Date
Msg-id 5743A1A5-A8DF-4463-9B00-0D87B32C622D@blighty.com
Whole thread Raw
In response to schema change tracking  (Benedict Holland <benedict.m.holland@gmail.com>)
List pgsql-general

> On May 16, 2019, at 5:41 PM, Benedict Holland <benedict.m.holland@gmail.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
thosechanges 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
changesto ... 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





pgsql-general by date:

Previous
From: Benedict Holland
Date:
Subject: schema change tracking
Next
From: Susan Hurst
Date:
Subject: Permissions for information_schema