1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2024-12-25 17:02:23 +00:00

restart postgres to disconnect everybody

This commit is contained in:
Pierre-antoine Comby 2020-06-01 17:55:03 +02:00
parent 559be286b2
commit 9e8d0901d1

View File

@ -1,4 +1,6 @@
#!/usr/bin/sh
sudo service postgresql stop
sudo service postgresql start
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