How do you handle Postgres schema comparison and drift in 2026?
Hey everyone,
I'm trying to figure out the cleanest way to compare schemas between different PostgreSQL environments (e.g., local dev vs. staging, or staging vs. production).
Every now and then, a quick manual change slips through or a migration script gets applied out of order, and finding the small diffs (missing indexes, subtle column type mismatches, slightly different constraints) becomes a headache.
I know some people rely on feature-rich GUIs like HeidiSQL or SQuirrel SQL for visual diffs, while others prefer dedicated CLI tools or CI/CD pipelines to catch schema drift automatically before it hits prod.
How are you currently handling this?
Do you rely on your GUI's built-in schema diff tool?
Do you use standalone CLI utilities or migration framework checks?
Or do you just treat migrations as immutable and strictly rely on CI checks?