zulip/tools/do-destroy-rebuild-database

8 lines
279 B
Bash
Executable File

#!/bin/sh -xe
echo "DROP SCHEMA humbug CASCADE; CREATE SCHEMA humbug;" | psql -h localhost humbug humbug
python manage.py syncdb --noinput
echo "CREATE UNIQUE INDEX ON auth_user (email);" | psql -h localhost humbug humbug
python manage.py populate_db --replay-old-messages -n0