create-db.sql: Start by dropping the zulip database if needed.

At some point the PostgreSQL Docker image started creating the zulip
database for us, which caused our CREATE DATABASE to fail.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-01-15 19:36:40 -05:00
committed by Tim Abbott
parent 298d45b46a
commit 8c733a3f68
2 changed files with 2 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
\connect postgres
DROP DATABASE IF EXISTS zulip;
DO $$BEGIN
CREATE USER zulip;
EXCEPTION WHEN duplicate_object THEN