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.

14 lines
468 B

  1. # check if in virtual environment
  2. # https://stackoverflow.com/questions/15454174/how-can-a-shell-function-know-if-it-is-running-within-a-virtualenv/15454916
  3. python -c 'import sys; print(sys.real_prefix)' 2>/dev/null && INVENV=1 || INVENV=0
  4. # echo $INVENV
  5. # if $INVENV is 1, then in virtualenv
  6. if [ $INVENV -eq 1 ]; then
  7. rm spotifyvis/migrations/00*
  8. sudo -u postgres psql -f reset_db.sql
  9. python manage.py makemigrations
  10. python manage.py migrate
  11. fi