matrix-synapse: create with utf-8 encoding

This commit is contained in:
Jörg Thalheim 2024-05-31 17:16:52 +02:00
parent dfd8ffaeff
commit a8fa865825

View File

@ -94,7 +94,7 @@ in
sleep 1
done
if ! psql -tAc "SELECT 1 FROM pg_database WHERE datname = 'matrix-synapse'" | grep -q 1; then
psql -c "CREATE DATABASE \"matrix-synapse\" TEMPLATE template0 LC_COLLATE = 'C' LC_CTYPE = 'C'"
psql -c "CREATE DATABASE \"matrix-synapse\" TEMPLATE template0 LC_COLLATE = 'C' LC_CTYPE = 'C' ENCODING = 'UTF8'"
fi
# create user if it doesn't exist and make it owner of the database
if ! psql -tAc "SELECT 1 FROM pg_user WHERE usename = 'matrix-synapse'" | grep -q 1; then