boilerplate schemas to support quick implementation of postgraphile projects using sqitch to manage db scripts
basic packages include:
- app-roles:
- creates db roles to support postgres rls security
- auth:
- app_user management and login support.
- this version supports the basic auth described in the postgraphile docs.
- support for oauth or other strategies may be added here or in an alternate schema flavor
- requires app-roles
- org:
- generic organization/location/contact support.
- org.contact ==> auth.app_user
- requires auth
install sqitch
install postgraphile
npm install -g postgraphile
git clone https://github.com/stlbucket/sqitch-phile.git
cd sqitch-phile
rm -rf .git
git init
git add .
git commit -am 'init commit'
createdb [YOUR DATABASE NAME]
cd db
cp cmd.config.example cmd.config
... then set your database name in cmd.config ...
#!/usr/bin/env bash
database="[YOUR DATABASE NAME]"
hostname="localhost"
packages=(
schema/app-roles
schema/auth
schema/auth_fn
schema/org
schema/org_fn
core-data
)
... then let sqitch-phile configure all your packages ...
./cmd/configure
./cmd/deploy
assuming you've got postgraphile installed globally:
./cmd/server
in a second terminal, navigate to ./cli/ and...
npm run test
./dev/execute unit-test-results
./cmd/revert
./cmd/verify
work on your schemas individually the sqitch way
when you're ready to release, tag it:
./cmd/tag [tag-name] -n '[tag-message]'