view schema/README @ 207:88d21c29cf04

Care for the fact that role attributes are not inherited Tests are now run with login roles instead of abstract base roles. create_user has become a SECURITY DEFINER function, thus circumventing RLS policies and that a sys_admin cannot CREATE ROLEs by himself. A test has been added to showcase the intentional error in case the name of an abstract base role is used as a new username.
author Tom Gottfried <tom@intevation.de>
date Mon, 23 Jul 2018 11:29:41 +0200
parents 68fd656c3d55
children
line wrap: on
line source

Build Dockerfile with e.g.:
$ docker build -t gemma_db .

Get a running instance with e.g.:
$ docker run --name gemma_db -d -p 54321:5432 -v $PWD:/opt/gemma gemma_db

Run tests for RLS policies:
$ docker exec gemma_db ./run_tests.sh

Create ER diagrams with e.g.:
Auxiliary tables:
$ postgresql_autodoc -p 54321 -h $dockerhost \
      -d gemma -U sophie --password=so2Phie4 -t dot -l . -s 'gemma'
$ dot -Tpdf gemma.dot > gemma_auxiliary.pdf

Waterway related tables:
$ postgresql_autodoc -p 54321 -h $dockerhost \
      -d gemma -U sophie --password=so2Phie4 -t dot -l . -s 'gemma_waterway'
$ dot -Tpdf gemma.dot > gemma_waterway.pdf

Fairway/bottleneck related tables:
$ postgresql_autodoc -p 54321 -h $dockerhost \
      -d gemma -U sophie --password=so2Phie4 -t dot -l . -s 'gemma_fairway'
$ dot -Tpdf gemma.dot > gemma_fairway.pdf