OrganizationSettings
Org-private settings — branding, billing address, logo, defaults. Lives in the org schema (moves to the per-tenant DB at physical split). One row per org.
Tables owned
| Table | Purpose |
|---|---|
org.organization_settings | Single-row table per org. Branding / billing / address / logo fields. |
Operations
Writes
upsert(conn, patch)→OrganizationSettings. Creates the settings row on first write; updates on subsequent calls. Tenant comes fromapp.org_id.logoUrlis just one of the patch fields — clients upload the logo to their own storage and PATCH the URL viaE014.
Reads
get(conn)→OrganizationSettings | null. Returns the row for the current org (app.org_id).listByOrgIds(conn, orgIds)→OrganizationSettings[]. Cross-tenant batched read by org_id, intended for platform-layer workflows (e.g./me) that span all orgs a user belongs to and therefore run outside any singleapp.org_idcontext. Caller is responsible for authorization — pass only org_ids the user is permitted to see. Missing rows are simply omitted.