Skip to content

Instantly share code, notes, and snippets.

@vivg
Created March 27, 2015 17:57
Show Gist options
  • Save vivg/1209c0157dfcb9a6c125 to your computer and use it in GitHub Desktop.
Save vivg/1209c0157dfcb9a6c125 to your computer and use it in GitHub Desktop.
Takes Postgresql schema dump and runs apgdiff tool to save the diff in a file.
pg_dump -U perkdsp -svf "production_schema.sql" perkdsp
pg_dump -U perkdsp -svf "staging_schema.sql" perkdsp_staging
java -jar apgdiff-2.4.jar production_schema.sql staging_schema.sql > diff.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment