Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 0.0.3
Fetching contributors…

Cannot retrieve contributors at this time

file 45 lines (28 sloc) 1.369 kb

PostgreSQL Change Management Tool

This project is a tool for schema change management within a PostgreSQL database cluster.


Installation of psql-cm

Once the prerequisites have been satisfied on your system, using the 'gem' command from Ruby 1.9.3 do:

user$ gem install psql-scm


Setup the psql_cm control tables on the target databases, use a comma (',') to separate multiple database names.

user$ psql-cm --databases psqlcm_test --uri "postgres://" setup


Dump the current database schema to the specified --sql-path directory, if none specified it dumps to $PWD/sql

user$ psql-cm --databases psqlcm_test --uri "postgres://" dump

Restore (Currently being implemented)

Restore a previously psql-cm dumped database schema into a brand new postgresql database cluster.

user$ psql-cm --databases psqlcm_test --uri "postgres://" restore


user$ createdb psqlcm_test
user$ psql psqlcm_test -c 'CREATE SCHEMA schema_one; CREATE SCHEMA schema_two'
user$ echo psql-cm --databases psqlcm_test --uri "postgres://" setup
user$ psql-cm --databases psqlcm_test --uri "postgres://" dump
Something went wrong with that request. Please try again.