Files
zulip/tools/do-destroy-rebuild-database
Zev Benjamin 8767c33536 Persist the tsearch_extras extension across rebuilding of the database
We do this by creating a new zulip{_test}_base database that only has the zulip
schema and the tsearch_extras extension.  We then use that as a template when
creating zulip{_test}.

(imported from commit 8adb4b98410e4042a0187902e89c99561eac8c8f)
2014-01-31 13:29:10 -05:00

14 lines
392 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 syncdb --noinput
python manage.py migrate
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
python manage.py sync_api_key