CyMaIS Cleanup Central Database

Login to central database container:

docker exec -it central-postgres bash

Login to postgres database with user postgres:

psql -v ON_ERROR_STOP=1 -U postgres

Execute:

DROP DATABASE IF EXISTS {{database_name}}; 
CREATE DATABASE {{database_name}}; 
GRANT CREATE ON DATABASE {{database_name}} TO {{database_username}}; 

Login to {{database_name}} database with user postgres:

psql -v ON_ERROR_STOP=1 -U postgres -d {{database_name}}

Execute:

GRANT CREATE ON SCHEMA public TO {{database_username}};

Script can be found here: