17 lines
448 B
Bash
17 lines
448 B
Bash
|
#!/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
|