mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
Also use psql -e (--echo-queries) in scripts that use ‘set -x’, so errors can be traced to a specific query from the output. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
24 lines
687 B
Bash
Executable File
24 lines
687 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
set -x
|
|
|
|
"$(dirname "$0")/../scripts/setup/terminate-psql-sessions" zulip zulip zulip_base
|
|
|
|
psql -v ON_ERROR_STOP=1 -e -h localhost postgres zulip <<EOF
|
|
DROP DATABASE IF EXISTS zulip;
|
|
CREATE DATABASE zulip TEMPLATE zulip_base;
|
|
EOF
|
|
|
|
sh "$(dirname "$0")/../scripts/setup/flush-memcached"
|
|
|
|
./manage.py purge_queue --all
|
|
./manage.py migrate --noinput
|
|
./manage.py get_migration_status --settings=zproject.settings --output="migration_status_dev"
|
|
./manage.py createcachetable third_party_api_results
|
|
./manage.py populate_db -n100 --threads=1
|
|
# Ensure that the local user's API key is synced from ~/.zuliprc
|
|
|
|
if [ -e ~/.zuliprc ]; then
|
|
./manage.py sync_api_key
|
|
fi
|