Simple framework for PostgreSQL
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
plpgunit @ 2fdac63
scripts
src
tests/functions
.gitmodules
Gemfile
Gemfile.lock
LICENSE
README.md
VERSION
postgres-framework.gemspec

README.md

PostgreSQL Framework

It's simple framework for PostgreSQL database with unit tests and versioning.

Created based on:

Install framework

bundle install

Add framework scripts

bundle exec sem-add-framework

Add script

bundle exec sem-add-safe ./new-script.sql

Applying changes to your local database

bundle exec sem-apply --url postgresql://postgres@localhost/sample --password

Other commands

Go to Schema Evolution Manager (sem).

Run tests

BEGIN TRANSACTION;
SELECT * FROM unit_tests.begin();
ROLLBACK TRANSACTION;

Writing tests

Go to PostgreSQL Unit Testing Framework.

Uninstall tests

DROP SCHEMA IF EXISTS assert CASCADE;
DROP SCHEMA IF EXISTS unit_tests CASCADE;
DROP DOMAIN IF EXISTS public.test_result CASCADE;

Uninstall framework

It's' dangerous.

DROP SCHEMA IF EXISTS framework CASCADE;