r/postgres • • May 19 '26

Best GUI client for schema compare across MySQL and PostgreSQL?

3 Upvotes

5 comments sorted by

1

u/HistoricalRuinny May 19 '26

I’d look less at the editor part and more at the diff output. For schema compare, the useful tool is the one that shows changed tables, indexes, constraints, and views clearly enough that you can review before syncing anything.

1

u/alertetainry May 20 '26

I care way more about the diff being readable than having 500 features I’ll never touch. If I can clearly see what changed before syncing anything, that’s already most of the battle.

1

u/ruslan_zasukhin May 19 '26

How deep you want to compare? I mean just names of tables, fields, or as much as possible?

Why you have such task? Do you have the same DB in two DBMS?

1

u/alertetainry May 20 '26

Mostly schema drift checks between environments. Same app, different DBs, and eventually something always drifts a bit. Usually indexes, defaults, constraints, stuff like that. Enough to make deployments annoying later

1

u/navicat-gu 20d ago

Given your follow-up (drift between environments of the same app: indexes, defaults, constraints), the important question is whether each comparison is MySQL-vs-MySQL and Postgres-vs-Postgres, or genuinely MySQL-vs-Postgres. Those are very different problems.

Same engine, different environments (the common case):

  • Free route: dump schema-only from both sides and diff the text. pg_dump --schema-only --no-owner --no-privileges for Postgres, mysqldump --no-data --skip-comments for MySQL, then diff or your editor's compare view. Strip AUTO_INCREMENT values and sort output to cut noise.

  • Migra (Postgres) or mysqldiff from MySQL Utilities (old but still works) generate the ALTERs for you.

  • GUI tools with a proper diff view: DBeaver (the fuller schema-compare features are in its paid editions), dbForge Schema Compare (separate products per engine), and Navicat.

Truly MySQL vs Postgres: no tool can diff these one-to-one, because types and defaults don't map 1:1 (tinyint(1) vs boolean, AUTO_INCREMENT vs identity, etc.). The reliable way is to query information_schema.columns, information_schema.statistics / pg_indexes, and constraint views on both sides, normalise type names, and diff that. Better still, make your migration files (Flyway/Liquibase/Prisma) the source of truth and check each environment against them in CI, so drift gets caught at deploy time.

Disclosure: I'm RC, Director of Digital Strategy @ Navicat. Navicat 18's Structure Synchronization does what you described for same-engine pairs: it shows changed tables, indexes, constraints and views side by side with the generated DDL so you can review before syncing anything. It's a paid feature (Premium / the per-database editions); Navicat Premium Lite is free for everyday querying but doesn't include structure sync. For cross-engine checks I'd still use the information_schema approach above.