postgres-init: enable citext extension on asxpio db
All checks were successful
Deploy storage stack / deploy (push) Successful in 14s
All checks were successful
Deploy storage stack / deploy (push) Successful in 14s
Needed for case-insensitive email columns in the asxpio users table. Runs as the Postgres superuser inside the init container; idempotent.
This commit is contained in:
parent
f8627e65f7
commit
459ee15f00
1 changed files with 7 additions and 0 deletions
|
|
@ -23,7 +23,14 @@ ensure_db() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ensure_extension() {
|
||||||
|
db="$1"
|
||||||
|
ext="$2"
|
||||||
|
psql -d "${db}" -c "CREATE EXTENSION IF NOT EXISTS \"${ext}\";"
|
||||||
|
}
|
||||||
|
|
||||||
ensure_role "asxpio" "${ASXPIO_DB_PASSWORD}"
|
ensure_role "asxpio" "${ASXPIO_DB_PASSWORD}"
|
||||||
ensure_db "asxpio" "asxpio"
|
ensure_db "asxpio" "asxpio"
|
||||||
|
ensure_extension "asxpio" "citext"
|
||||||
|
|
||||||
echo "postgres-init: done"
|
echo "postgres-init: done"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue