FREEDOM251

Freedom251 › Database Schema Comparison Tools

apgdiff

Free plan LinuxMacWindows

Visit apgdiff Alternatives Pricing

apgdiff's own site

What apgdiff is

apgdiff is a free command-line tool for comparing two PostgreSQL schema dump files. Give it an original dump and a newer one, and it can produce DDL statements to update the old schema or show the differences. You can print the generated SQL in the terminal or redirect it to a file; the project also describes calling the tool from batch jobs or web applications. It runs on Java 1.6 or newer, with Windows, Linux, Mac OS X, Solaris, and BSD listed as supported systems; other systems may work where Java is available. The latest stable release identified on the download page is version 2.4, available as binary and source ZIP downloads. Its supported SQL covers selected ALTER, CREATE, COMMENT, and SET search_path statements, while other statements are ignored. An option reports ignored DDL. For CREATE TABLE column constraints, support is limited to NULL and NOT NULL. The project uses the MIT License.

Who it suits

It suits PostgreSQL users comfortable working in a terminal who need to compare schema dumps or generate upgrade SQL. Its command-line format may be inconvenient for people who do not use command-line applications.

What it does well

  • Free, MIT-licensed software.
  • Prints generated SQL or redirects it to a file.
  • Runs on Windows, Linux, macOS, Solaris, and BSD.
  • Can report DDL statements it ignores.

What to know first

  • Other SQL statements are ignored.
  • CREATE TABLE column constraints support only NULL and NOT NULL.
  • Requires Java 1.6 or newer.
  • Latest stable release listed is version 2.4.

Limits

The free plan is the tool, with no trial period. SQL statements outside its supported set are ignored, and CREATE TABLE column constraints are limited to NULL and NOT NULL.

Plans

PlanBilled and limitsPrice
FreeFree PostgreSQL schema diff tool · MIT licensedFree

As github.com lists them, read 4 Oct 2026. The maker's own page has the final word.

Getting started

  1. Open the apgdiff project website at https://github.com/fordfrog/apgdiff.
  2. Choose the binary or source ZIP download for version 2.4.
  3. Install Java 1.6 or newer.
  4. Run apgdiff from a terminal with an original schema dump and a new schema dump.
  5. Print the generated SQL or redirect it to a file.
  6. Review generated upgrade statements and consider trying them on another database before production use.

apgdiff is a free, Java-based command-line tool that compares two PostgreSQL schema dump files and generates SQL to update the older schema. It suits developers and database administrators comfortable working in a terminal who need a focused schema-diff step in a batch or web-application workflow. Its narrow scope and ignored SQL make careful review of its output essential.

Overview

Give apgdiff an original dump and a newer dump; it can print the resulting DDL or redirect it to a file. That makes it useful for producing migration scripts from a pair of snapshots without requiring a graphical interface. It compares dump files rather than offering a broader database-management environment, and its database scope is PostgreSQL alone.

The tool is MIT licensed and free. The download page identifies version 2.4 as the latest stable release; project news dates that release to 2012-09-21. It is a lean option for a bounded task, but teams seeking a current, actively evolving workflow should weigh that project history before adopting it.

Key features

apgdiff supports selected schema statements, including ALTER TABLE, ALTER SEQUENCE, CREATE TABLE, CREATE VIEW, CREATE FUNCTION, CREATE INDEX, CREATE TRIGGER, and comments. For teams whose dumps rely on those constructs, it can turn structural differences into upgrade DDL that can be saved as a migration script.

Its coverage is not a complete SQL parser: other statements are ignored, and CREATE TABLE column constraints are limited to NULL and NOT NULL. The --output-ignored-statements option can expose ignored DDL, which helps identify gaps, but does not make those statements part of the generated update. Review the output and consider testing it against another database before using it in production.

Because it runs in a terminal, apgdiff can fit scripts and batch jobs, but that same interface is a poor match for users who expect a graphical comparison tool. It is a Java program requiring Java 1.6 or newer. The supported-systems page names Linux, Windows, Mac OS X, Solaris, and BSD, and says other systems with Java may work.

Pricing

There is one plan: Free. It includes a free PostgreSQL schema-diff tool under the MIT License, with migration-script generation. There is no paid tier or free trial to weigh; the trade-off is the tool's restricted SQL coverage rather than a feature gate.

Platforms

apgdiff is listed for Linux, macOS, and Windows. Its Java runtime and the broader supported-systems guidance extend the stated reach to Solaris, BSD, and potentially other Java-capable systems.

Who it's for

Choose apgdiff if you work with PostgreSQL dumps, prefer command-line tools, and want to generate update DDL without paying for a schema-diff utility. It is less suitable for users who need broad SQL coverage, a graphical workflow, or a tool whose project history indicates more recent releases.

Pros and cons

  • Pros: Free and MIT licensed, with no trial or subscription decision; generates DDL from two PostgreSQL schema dumps and can save it as a migration script.
  • Pros: Command-line operation makes it suitable for batch or web-application workflows, and the ignored-statement option helps flag some coverage gaps.
  • Cons: It ignores unsupported SQL, while column constraints in CREATE TABLE are limited to NULL and NOT NULL, so generated updates need scrutiny.
  • Cons: The terminal interface will inconvenience users who are not accustomed to command-line applications, and version 2.4 dates to 2012.

Alternatives

For a broader comparison of tools in this category, see Database Schema Comparison Tools.

  • dbForge Studio for PostgreSQL is worth considering if you want a free limited-feature Express plan, a free trial, or a paid Standard plan at $89.95 a year.
  • Skeema suits readers comparing free Community coverage for tables, stored procedures, functions, and 18 linter checks with a Plus plan at $124/month or
  • sqldef is another free, open-source CLI option for Linux, macOS, Windows, and self-hosted use.
  • pgquarrel is a free BSD-3-Clause alternative for Linux, Windows, and self-hosted use.
  • dbdiff is another free option with Linux, macOS, Windows, and self-hosted platform support.
  • DBDiff is a free alternative described by Akal Software as an open-source project.
  • DBC is another free option for Linux, macOS, and Windows.
  • Redgate SQL Provision is a paid alternative with a free trial and capacity tiers based on production data volume.

Verdict

apgdiff is a sensible choice for command-line users who need a free, focused way to derive PostgreSQL migration DDL from schema dumps. Its simplicity and MIT license are compelling for that specific job; look elsewhere if you need broader SQL coverage, a graphical workflow, or a more recent release history.

Verdict

apgdiff offers a focused way to compare PostgreSQL schema dumps and generate DDL. Review its output and consider testing it on another database before applying upgrade statements to production.

Questions

How much does apgdiff cost?

The listed Free plan costs nothing.

Is there a free trial?

No. The listed free trial is no; apgdiff has a free plan.

Which operating systems does it support?

The project lists Windows, Linux, Mac OS X, Solaris, and BSD. It also says apgdiff can run on other systems where Java is available.

Is apgdiff open source?

The project is licensed under the MIT License, and its download page offers a source ZIP.

What does apgdiff compare?

It compares two PostgreSQL database schema dump files and generates DDL statements to update the old schema or show differences.

Where can users report a bug or request a feature?

The project directs users to GitHub Issues for bug reports and feature requests.

Facts from apgdiff's own pages

Command line
apgdiff is a command-line tool run from a terminal and the homepage says it is useful to call from batches or web applications. · apgdiff.com, 4 Oct 2026
Download
The download page identifies version 2.4 as the latest stable release and offers binary and source ZIP downloads. · apgdiff.com, 4 Oct 2026
Feature constraint
For CREATE TABLE column constraints, the supported features page says only NULL and NOT NULL are supported. · apgdiff.com, 4 Oct 2026
Founded
2006 · github.com, 28 Sept 2026
License
The project is licensed under the MIT License. · apgdiff.com, 4 Oct 2026
Project activity
The project news page lists version 2.4 as released on 2012-09-21 and says the project moved to GitHub on 2012-08-03. · apgdiff.com, 4 Oct 2026
Purpose
apgdiff compares two PostgreSQL database schema dump files and outputs DDL statements to update the old schema or show the differences. · apgdiff.com, 4 Oct 2026
Review generated SQL
The usage guide recommends reviewing generated upgrade statements and possibly testing them on another database before applying them to production. · apgdiff.com, 4 Oct 2026
Runtime
apgdiff is a Java program and its installation page requires Java 1.6 or newer. · apgdiff.com, 4 Oct 2026
SQL coverage
The supported statements page lists support for selected ALTER SEQUENCE, ALTER TABLE, ALTER VIEW, COMMENT, CREATE FUNCTION, CREATE INDEX, CREATE SCHEMA, CREATE SEQUENCE, CREATE TABLE, CREATE TRIGGER, CREATE VIEW, and SET search_path statements. · apgdiff.com, 4 Oct 2026
Support
The site directs users to GitHub Issues to report bugs or request features and lists the author’s email for comments and suggestions. · apgdiff.com, 4 Oct 2026
Supported systems
The homepage lists Windows, Linux, Mac OS X, Solaris, and BSD, and says it can run on other systems where Java is available. · apgdiff.com, 4 Oct 2026
Unsupported statements
Other SQL statements are ignored, and the --output-ignored-statements option reports DDL statements the tool currently ignores. · apgdiff.com, 4 Oct 2026
Who it serves
The homepage says the command-line format suits users accustomed to command-line applications and may be inconvenient for users who are not. · apgdiff.com, 4 Oct 2026
Workflow
It takes an original schema dump and a new schema dump as input, and can print the generated SQL or redirect it to a file. · apgdiff.com, 4 Oct 2026

Where apgdiff stands on Freedom251

Look at these too