Skip to content
Snippets Groups Projects
reset_db.sh 777 B
Newer Older
Kasia Krasnowska's avatar
Kasia Krasnowska committed
#!/bin/bash

sudo su postgres -c "dropdb shellvalier"
sudo su postgres -c "createdb shellvalier -E UTF8 -T template0 -l pl_PL.utf8"
Kasia Krasnowska's avatar
Kasia Krasnowska committed

# reset the migrations since we create the DB from scratch
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc"  -delete

python manage.py makemigrations
python manage.py migrate

rm import.log

time python manage.py start_import
time python manage.py import_expansions
time python manage.py import_plWordnet
time python manage.py import_tei

head import.log
wc import.log

#python manage.py check_descriptions
python manage.py generate_semantics_css

# TODO dev only!!!
python manage.py shell -c "from django.contrib.auth.models import User; User.objects.create_superuser('shell', '', 'valier')"