Move tools/postgres-init-dev-db to tools/setup/.

This commit is contained in:
Umair Khan 2016-05-26 15:44:30 +05:00
parent b0991966ab
commit b85526576a
3 changed files with 5 additions and 5 deletions

View File

@ -337,7 +337,7 @@ pip install --no-deps -r requirements.txt
./scripts/setup/generate_secrets.py -d
if [ $(uname) = "OpenBSD" ]; then sudo cp ./puppet/zulip/files/postgresql/zulip_english.stop /var/postgresql/tsearch_data/; else sudo cp ./puppet/zulip/files/postgresql/zulip_english.stop /usr/share/postgresql/9.3/tsearch_data/; fi
./scripts/setup/configure-rabbitmq
./tools/postgres-init-dev-db
./tools/setup/postgres-init-dev-db
./tools/do-destroy-rebuild-database
./tools/setup/postgres-init-test-db
./tools/do-destroy-rebuild-test-database

View File

@ -181,7 +181,7 @@ def main():
run(["sudo", "service", "redis-server", "restart"])
run(["sudo", "service", "memcached", "restart"])
run(["scripts/setup/configure-rabbitmq"])
run(["tools/postgres-init-dev-db"])
run(["tools/setup/postgres-init-dev-db"])
run(["tools/do-destroy-rebuild-database"])
run(["tools/setup/postgres-init-test-db"])
run(["tools/do-destroy-rebuild-test-database"])

View File

@ -22,7 +22,7 @@ VAGRANTUSERNAME=$(whoami)
if [[ $# == 0 ]]; then
USERNAME=zulip
PASSWORD=$("$(dirname "$0")/../scripts/get-django-setting" LOCAL_DATABASE_PASSWORD)
PASSWORD=$("$(dirname "$0")/../../scripts/get-django-setting" LOCAL_DATABASE_PASSWORD)
DBNAME=zulip
SEARCH_PATH="$USERNAME",public
elif [[ $# == 4 ]]; then
@ -60,7 +60,7 @@ else
fi
chmod go-rw ~/.pgpass
"$(dirname "$0")/../scripts/setup/terminate-psql-sessions" "$USERNAME" "$DBNAME" "$DBNAME_BASE"
"$(dirname "$0")/../../scripts/setup/terminate-psql-sessions" "$USERNAME" "$DBNAME" "$DBNAME_BASE"
psql -h localhost postgres "$USERNAME" <<EOF
DROP DATABASE IF EXISTS $DBNAME;
@ -80,7 +80,7 @@ psql -h localhost postgres "$USERNAME" <<EOF
CREATE DATABASE $DBNAME TEMPLATE $DBNAME_BASE;
EOF
sh "$(dirname "$0")/../scripts/setup/flush-memcached"
sh "$(dirname "$0")/../../scripts/setup/flush-memcached"
echo "Database created"