Re: schema change tracking - Mailing list pgsql-general

From Mark Fletcher
Subject Re: schema change tracking
Date
Msg-id CAEO096oF-LGTk0KjL3FZZD2nSGDXE9SY6H-vDaJmwub2-y1-Kg@mail.gmail.com
Whole thread Raw
In response to schema change tracking  (Benedict Holland <benedict.m.holland@gmail.com>)
Responses Re: schema change tracking
List pgsql-general
On Thu, May 16, 2019 at 9:41 AM Benedict Holland <benedict.m.holland@gmail.com> wrote:

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?

We ended up rolling our own. We do schema dumps and then use https://www.apgdiff.com/ to diff them. For our relatively simple schemas, it's worked fine. One thing to note, apgdiff doesn't support `ALTER TABLE ONLY [a-z\.]+ REPLICA IDENTITY FULL;` lines, which we just remove before diffing.

Cheers,
Mark 

pgsql-general by date:

Previous
From: Paul Jungwirth
Date:
Subject: Re: schema change tracking
Next
From: Susan Hurst
Date:
Subject: Re: Permissions for information_schema