From 459ee15f00ad3f5d3aa0ba4ac0e12b2e7663c79e Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Tue, 26 May 2026 19:07:16 +0300 Subject: [PATCH] postgres-init: enable citext extension on asxpio db Needed for case-insensitive email columns in the asxpio users table. Runs as the Postgres superuser inside the init container; idempotent. --- init/postgres-init.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/init/postgres-init.sh b/init/postgres-init.sh index 10b35e4..733bcf8 100644 --- a/init/postgres-init.sh +++ b/init/postgres-init.sh @@ -23,7 +23,14 @@ ensure_db() { fi } +ensure_extension() { + db="$1" + ext="$2" + psql -d "${db}" -c "CREATE EXTENSION IF NOT EXISTS \"${ext}\";" +} + ensure_role "asxpio" "${ASXPIO_DB_PASSWORD}" ensure_db "asxpio" "asxpio" +ensure_extension "asxpio" "citext" echo "postgres-init: done"