cloud.config_values_tenant
Schema: cloud
Table: cloud.config_values_tenant
Description: Per-tenant configuration overrides. TenantAdmins use these rows to customize their instance. Applied after global overrides, before group and user overrides.
Overview
- Column prefix:
ctv_ - Primary key:
ctv_value_id - Unique constraint: one row per
(ctv_key_id, ctv_tenant_id)
Columns
| Column | Type | Null | Default | Description |
|---|---|---|---|---|
ctv_value_id | integer | NO | auto-increment | Surrogate primary key. |
ctv_key_id | integer | NO | FK → cloud.config_catalog.cck_key_id. | |
ctv_tenant_id | integer | NO | FK → cloud.tenants.ten_internal_id. Tenant this override belongs to. | |
ctv_value | text | NO | '' | Override value (string representation). |
ctv_updated_by | uuid | YES | NULL | FK → cloud.users.usr_user_id. Who set this override. |
ctv_updated_at | timestamptz | NO | NOW() | Last modification timestamp. |
Constraints
- Primary key:
pk_config_values_tenant→ctv_value_id - Unique:
c_uk_ctv_key_tenant→(ctv_key_id, ctv_tenant_id) - FK:
fk_ctv_key→cloud.config_catalog(cck_key_id)ON DELETE CASCADE - FK:
fk_ctv_tenant→cloud.tenants(ten_internal_id)ON DELETE CASCADE - FK:
fk_ctv_updated_by→cloud.users(usr_user_id)ON DELETE SET NULL (audit only — override value is preserved when the user is deleted)
Behavior
- A row exists only when the tenant value differs from the resolved global value.
- Deleting a row causes the key to fall back to the global override (or catalog default).
- A key is eligible for a tenant override only if
cck_allowed_levels & 2 != 0. - Policy enforcement: the write endpoint validates that tenant values do not violate global constraints. For example,
auth.password.min_lengthcannot be set below the current global value — tenants may only tighten security settings, not loosen them.