CAP.L0.TENANCY_REFERENCE_MISSING — tenancy is `explicit` and no reference tenant is named
- Category: safety
- Level: 0
- Stability: stable
- Suites: audit
sqlens.audit.tenancy.mode is explicit and no reference tenant is named.
Why this is its own notice
It is a different state from a project that has not answered the question at all. Telling a project
that has already set explicit that it "looks multi-tenant" would describe a discovery it made
before you did. This one says the specific thing that is missing.
What the reference tenant is for
An audit over several tenant databases is not a single statement. Naming one says: this report is about this tenant's schema, and the others are assumed to match it. The header prints that name, so a finding is never read as applying to all of them.
What to do
// config/sqlens.php
'audit' => [
'tenancy' => [
'mode' => 'explicit',
'reference' => 'tenant_reference',
],
],
Pick a tenant whose schema is the one migrations are written against — usually a reference or template database rather than a customer's.