Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joncrlsn/pgdiff
Compares the PostgreSQL schema between two databases and generates SQL statements that can be run manually against the second database to make their schemas match.
https://github.com/joncrlsn/pgdiff
database diff diffing go postgresql-database sql-generation
Last synced: 29 days ago
JSON representation
Compares the PostgreSQL schema between two databases and generates SQL statements that can be run manually against the second database to make their schemas match.
- Host: GitHub
- URL: https://github.com/joncrlsn/pgdiff
- Owner: joncrlsn
- License: mit
- Created: 2014-09-09T03:41:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-11-10T02:36:42.000Z (about 1 month ago)
- Last Synced: 2024-11-10T03:24:44.478Z (about 1 month ago)
- Topics: database, diff, diffing, go, postgresql-database, sql-generation
- Language: Go
- Homepage:
- Size: 259 KB
- Stars: 438
- Watchers: 15
- Forks: 61
- Open Issues: 23
-
Metadata Files:
- Readme: README-linux.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - joncrlsn/pgdiff - Compares the PostgreSQL schema between two databases and generates SQL statements that can be run manually against the second database to make their schemas match. (Go)
- starred-awesome - pgdiff - Compares the PostgreSQL schema between two databases and generates SQL statements that can be run manually against the second database to make their schemas match. (Go)
README
## Linux pgdiff instructions
These instructions will guide you through the process of generating SQL, reviewing it, and optionally running it on the target database. It requires a familiarity with a Linux command-line shell.
1. download pgdiff-linux-\.tar.gz to your machine
1. untar it (a new directory will be created: called pgdiff)
1. cd into the new pgdiff directory
1. edit pgdiff.sh to change the db access values... or set them at runtime (i.e. USER1=joe NAME1=mydb USER2=joe NAME2=myotherdb ./pgdiff.sh)
1. run pgdiff.sh## tar contents
* pgdiff - a linux executable
* pgrun - a linux executable for running SQL
* pgdiff.sh - a bash shell script to coordinate your interaction with pgdiff and pgrunIf you write a Go version of pgdiff.sh, please share it and I'll include it for others to use (with your copyright information intact).