1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2024-12-26 17:32:23 +00:00
nk20-scripts/shell/tabularasa

10 lines
327 B
Plaintext
Raw Normal View History

2020-04-10 21:06:12 +00:00
#!/usr/bin/sh
sudo service postgresql stop
sudo service postgresql start
2020-04-10 21:06:12 +00:00
sudo -u postgres sh -c "dropdb note_db && psql -c 'CREATE DATABASE note_db OWNER note;'";
echo 'reset db';
2020-05-26 21:53:13 +00:00
find apps/ -path "*/migrations/*.py*" -not -name "__init__.py" -delete
./manage.py makemigrations
./manage.py migrate
./manage.py loaddata initial