Let an app ask for PostgreSQL extensions its user can't make

coreapp.toml's [postgres] extensions = ["vector"]: the installer checks
the Core's PostgreSQL has each one (refusing before anything changes if
not) and makes them in the app's database as the superuser, with CASCADE,
on install and every update. Ones taken off the list are kept, since the
data may use them. Also fixes the check refusing needs with both postgres
and mysql, which never ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 20:28:33 -07:00
co-authored by Claude Opus 5.5
parent a7cd4e325c
commit cf18bef278
9 changed files with 113 additions and 8 deletions
+3 -1
View File
@@ -45,7 +45,9 @@ keep its values and add new ones):
| `CORE_ADMIN_EMAIL` | `admin@<domain>`, the Core's admin account: always an admin of the app, when it signs in with the Core |
`needs = ["postgres"]` adds `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER` and
`DB_PASSWORD` (`needs = ["mysql"]` the same, for MariaDB); `needs = ["sso"]` adds `OIDC_ISSUER`, `OIDC_CLIENT_ID` and
`DB_PASSWORD` (`needs = ["mysql"]` the same, for MariaDB; PostgreSQL
extensions only a superuser can make, like vector, go in `coreapp.toml`'s
`[postgres] extensions`); `needs = ["sso"]` adds `OIDC_ISSUER`, `OIDC_CLIENT_ID` and
`OIDC_CLIENT_SECRET` (the client's callback, PKCE and secret method are in
`coreapp.toml`'s `[sso]`); `needs = ["email"]` adds `SMTP_HOST`, `SMTP_PORT`
(587), `SMTP_SECURITY` (`starttls`), `SMTP_USER`, `SMTP_PASSWORD` and
+5
View File
@@ -29,3 +29,8 @@ needs = []
# callback = "/auth/callback" # the path it sends people back to
# pkce = true # whether it sends PKCE (S256)
# token_auth = "client_secret_basic" # or "client_secret_post"
# With "postgres": extensions the app's database user can't make itself,
# made by the Core (coreapp core lists what it has)
# [postgres]
# extensions = ["vector"]