Get alembic up and running
I took a stab at a reasonable schema just to get started. For now I want workflows that are working. I'll pound the thing into the correct shape in time
This commit is contained in:
parent
3e4eab0802
commit
681a62bbf5
7 changed files with 304 additions and 0 deletions
20
bin/setup_dev.sh
Executable file
20
bin/setup_dev.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
name=${PWD##*/}
|
||||
name=${name//[-._]/}
|
||||
|
||||
printf 'Setting up %s\n' $name
|
||||
|
||||
printf "...Creating databases\n"
|
||||
dropdb ${name}
|
||||
dropdb ${name}_test
|
||||
|
||||
createdb ${name}
|
||||
createdb ${name}_test
|
||||
|
||||
psql -d ${name} -c "CREATE EXTENSION IF NOT EXISTS pgcrypto;"
|
||||
psql -d ${name}_test -c "CREATE EXTENSION IF NOT EXISTS pgcrypto;"
|
||||
|
||||
psql -d ${name} -c "CREATE USER vanth_dev WITH PASSWORD 'letmein';"
|
||||
|
||||
psql -d ${name} -c "GRANT ALL PRIVILEGES ON DATABASE ${name} to dev;"
|
||||
psql -d ${name}_test -c "GRANT ALL PRIVILEGES ON DATABASE ${name}_test to dev;"
|
Loading…
Add table
Add a link
Reference in a new issue