mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 02:48:00 +00:00
17 lines
322 B
Bash
Executable File
17 lines
322 B
Bash
Executable File
#!/bin/sh -xe
|
|
|
|
su postgres -c psql <<EOF
|
|
CREATE USER zulip;
|
|
ALTER ROLE zulip SET search_path TO zulip,public;
|
|
DROP DATABASE IF EXISTS zulip;
|
|
CREATE DATABASE zulip OWNER=zulip;
|
|
EOF
|
|
|
|
su postgres -c psql zulip <<EOF
|
|
CREATE SCHEMA zulip OWNER=zulip;
|
|
CREATE EXTENSION tsearch_extras SCHEMA zulip;
|
|
EOF
|
|
|
|
echo "Database created"
|
|
|