Alternative project

I haven't worked on zongle since 2004 or 2005. As an alternative I suggest you have a look at Miroslav Ć ulc's apgdiff at http://apgdiff.startnet.biz/. Florian Lanthaler, 2010


zongle compares the schema of two PostgreSQL databases and creates a script containing the SQL statements necessary to migrate the structure of the second database to the state of the first.

zongle is one-way: it compares the schema of a primary database to the schema of a secondary database and creates SQL statements accordingly. It does not check whether there are any additional tables/columns/other items in the secondary database.

Currently the comparison between two live databases is supported. The comparison between two scripts (as from pg_dump) or between a script and a live database will be supported in an upcoming release.

The current release 0.1.1 still lacks support for triggers and schema names, but nonetheless you might like to give it a whirl and drop me a line if you find it useful.

zongle is written in PHP CLI (no webserver required) and makes use of the Pear packages DB and Console_Getopt. It is developed under Debian GNU/Linux but any platform running PHP CLI, Pear::DB, Pear::Console_Getopt and PostgreSQL should be supported.




You can get packages from the download section. Current release is zongle-0.1.1.tar.gz.

This is a bugfix release: PostgreSQL does not allow to add NOT NULL columns when doing an ALTER TABLE. Thanks to Tim Wasson for pointing this out and sending a patch. Also, non-NULL default values are now set correctly.


Feel free to drop a suggestion or ask for help on the zongle-users mailing list (subscription required for posting) or on the project's forums.

Possible long term goals

Being written in PHP, various front-ends can be plugged onto zongle, as a web-based or a Gtk one (PHP-GTK). Such a front-end could visually show the differences between the structures of the databases and allow users to manually select which changes to apply and which not.

Similar projects

In the past I have run across two similar projects, both named pgdiff.