SR020
Severity: error
Summary: tenant_key references a field that is not type uuid
What this means
The tenant_key: value names a field in the schema, but that field is not type: uuid. Tenant keys are used for row-level multi-tenancy and must be UUIDs to match the primary key type of the tenant resource.
Example that triggers this
resource: items
version: 1
tenant_key: org_name
schema:
id: { type: uuid, primary: true, generated: true }
org_name: { type: string, required: true }
How to fix it
Change the referenced field’s type to uuid:
org_name: { type: uuid, ref: organizations.id, required: true }