mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
The `en_US.UTF-8` locale may not be configured or generated on all installs; it also requires that the `locales` package be installed. If users generate the `en_US.UTF-8` locale without adding it to the permanent set of system locales, the generated `en_US.UTF-8` stops working when the `locales` package is updated. Switch to using `C.UTF-8` in all cases, which is guaranteed to be installed. Fixes #15819.
17 lines
407 B
SQL
17 lines
407 B
SQL
\connect postgres
|
|
DROP DATABASE IF EXISTS zulip;
|
|
DO $$BEGIN
|
|
CREATE USER zulip;
|
|
EXCEPTION WHEN duplicate_object THEN
|
|
RAISE NOTICE 'zulip user already exists';
|
|
END$$;
|
|
ALTER ROLE zulip SET search_path TO zulip,public;
|
|
CREATE DATABASE zulip
|
|
OWNER=zulip
|
|
ENCODING=UTF8
|
|
LC_COLLATE='C.UTF-8'
|
|
LC_CTYPE='C.UTF-8'
|
|
TEMPLATE=template0;
|
|
\connect zulip
|
|
CREATE SCHEMA zulip AUTHORIZATION zulip;
|