Re: recommended schema diff tools? - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: recommended schema diff tools?
Date
Msg-id jm6uga$ulr$1@dough.gmane.org
Whole thread Raw
In response to recommended schema diff tools?  ("Welty, Richard" <rwelty@ltionline.com>)
Responses Re: recommended schema diff tools?
List pgsql-general
Welty, Richard wrote on 12.04.2012 16:57:
> can anyone recommend an open source tool for diffing schemas?
>
> (it should go without saying that i'm looking for ddl to update
> production and QA DBs from development DBs, but i'll say it, just in
> case.)

You might want to have a look at SQL Workbench/J.
It has it's own "SQL command" for doing a diff on schema level.

http://www.sql-workbench.net/manual/compare-commands.html

The output is a (dbms independent) XML file, but XSLT templates to transform that into SQL are available:

http://www.sql-workbench.net/xslt.html

The XSTL might need some adjusting for your purposes though.

But you should put a controlled way of deploying schema changes into place.
Doing a diff of a developer DB isn't really the ideal approach.

We are quite happy using Liquibase for this purpose: http://liquibase.org/

Thomas

pgsql-general by date:

Previous
From: Chris Angelico
Date:
Subject: Re: recommended schema diff tools?
Next
From: Andy Chambers
Date:
Subject: Re: trigger when clause