zulip/scripts/setup/initialize-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

19 lines
392 B
Bash
Executable File

#!/bin/bash -xe
# Change to root directory of the checkout that we're running from
cd $(dirname $0)/../..
psql <<EOF
DROP SCHEMA zulip CASCADE;
DROP SCHEMA public CASCADE;
CREATE SCHEMA zulip;
EOF
python manage.py checkconfig
python manage.py migrate --noinput
python manage.py createcachetable third_party_api_results
python manage.py initialize_enterprise_db
supervisorctl restart all