As an alternative for Eclipse IDE plug-in, it is possible to compare database schemas by using command line. To do this, you should download pgCodeKeeper-cli application, which works in stand-alone mode.
Console build of the program can be used for:
- creating a pgCodeKeeper “project” from file structure dump (without Eclipse project)
- creating migration scripts using pgCodeKeeper dumps and file strucutres
- creating migration scripts using database connections
The latest version of cli build can be downloaded here. In the unpacked archive use files for parameter passing: * * pgcodekeeper-cli.sh * * for Linux systems and * pgcodekeeper-cli.bat * for Windows systems.
You can view the set of parameters available for work with the program by executing the command:
./pgcodekeeper-cli.sh -o /home/codekeeper/projects/diff.sql jdbc:postgresql://localhost:5432/testdb1?user=user&password=password /home/codekeeper/projects/test1/
After executing this command, migration script of the differences from the project in the test1 directory into the testdb1 database on the localhost:5432 server will be written into the diff.sql file.
./pgcodekeeper-cli.sh /home/codekeeper/backup.sql /home/codekeeper/projects/test1/
After executing this command, the console will display migration script from the backup file into the project in the test1 directory.