Files
zulip/tools/do-destroy-rebuild-database
Reid Barton 362f9c6c5f Django 1.7: syncdb and migrate are now synonyms
(imported from commit b8a1b2476892bab2418240b04deea6aa40ff1b03)
2015-08-20 23:01:26 -07:00

17 lines
404 B
Bash
Executable File

#!/bin/sh -xe
psql -h localhost postgres zulip <<EOF
DROP DATABASE IF EXISTS zulip;
CREATE DATABASE zulip TEMPLATE zulip_base;
EOF
python manage.py migrate --noinput
python manage.py createcachetable third_party_api_results
python manage.py populate_db -n100 --threads=1
# Ensure that the local user's API key is synced from ~/.zuliprc
if [ -e ~/.zuliprc ]; then
python manage.py sync_api_key
fi