Graphs and tables for your Spotify account.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
430 B

#!/bin/bash
# check if in virtual environment
# https://stackoverflow.com/a/15454284/8811872
[[ "$VIRTUAL_ENV" == "" ]]; INVENV=$?
# if $INVENV is 1, then in virtualenv
# echo $INVENV
if [ $INVENV -eq 1 ]; then
rm login/migrations/0* api/migrations/0*
sudo -u postgres psql -f ./scripts/reset_db.sql
python3 manage.py makemigrations login api
python3 manage.py migrate --fake
python3 manage.py runserver
fi