1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2024-12-27 09:52:23 +00:00
nk20-scripts/shell/tabularasa
Pierre-antoine Comby 5af336fff3 make things cleaner
2020-05-26 23:54:14 +02:00

8 lines
268 B
Bash
Executable File

#!/usr/bin/sh
sudo -u postgres sh -c "dropdb note_db && psql -c 'CREATE DATABASE note_db OWNER note;'";
echo 'reset db';
find apps/ -path "*/migrations/*.py*" -not -name "__init__.py" -delete
./manage.py makemigrations
./manage.py migrate
./manage.py loaddata initial