1
0
Fork 0
gnuviechadmin-historic/testdb/dbschema/initdb.sh

17 lines
448 B
Bash
Raw Normal View History

#!/bin/bash
dirname=$(pwd)
dbname=testdb
dbuser=jan
dbpassword=heyyou97
reponame=gnuviechadmin
dburl=postgres://$dbuser:$dbpassword@localhost:5432/$dbname
sudo su - postgres -c "createdb -O $dbuser -E UTF-8 $dbname"
sudo su - postgres -c "psql $dbname < $dirname/initdb.sql"
#migrate create $reponame "GNUViech Admin"
migrate version_control $dburl $reponame
migrate manage manage.py --repository=$reponame --url=$dburl
python manage.py upgrade