Getting Help
Debugging
Section titled “Debugging”When something isn’t working as expected:
# See what pgmt is doingpgmt apply --verbose
# Full debug outputpgmt apply --debug
# Preview without making changespgmt apply --dry-runFor migration issues:
# Check if migrations are consistent with schemapgmt migrate validate
# See what's different between schema files and databasepgmt diffFor dependency ordering issues:
# Analyze the dependency graphpgmt debug dependencies
# Focus on a specific objectpgmt debug dependencies --object public.users
# Human-readable formatpgmt debug dependencies --format textIf pgmt baseline create or pgmt migrate new fails with ordering errors, use the debug command to inspect which objects depend on which, and add -- require: headers to your schema files as needed.
Common Setup Issues
Section titled “Common Setup Issues”Can’t connect to database:
# Is PostgreSQL running?pg_isready -h localhost -p 5432
# Does the database exist?createdb myapp_devShadow database creation fails:
Your user needs CREATEDB privilege. Or configure a manual shadow database:
databases: shadow: auto: false url: postgres://localhost/myapp_shadowReporting Issues
Section titled “Reporting Issues”When opening an issue on GitHub, include:
- pgmt version (
pgmt --version) - PostgreSQL version (
psql --version) - Full error output
- Steps to reproduce
- GitHub Issues - Bug reports
- GitHub Discussions - Questions
pgmt --helporpgmt <command> --help- CLI reference