# ADR-007: Multi-Tenancy via tenant_id (Extend Existing Pattern)

Status: Accepted | Date: 2026-05-21

## Context
Jube uses TenantRegistryId at the top of all data hierarchies.
mw-core already uses tenant_id on all tables.

## Decision
Extend mw-core's existing multi-tenancy pattern. Add tenant_id to all new risk schemas.
Add tenant_id as first segment of all Redis keys.

## Justification
- No architectural change needed — pattern already established and working.
- Redis key namespacing by tenant_id (risk:<tid>:...) prevents all cross-tenant
  data access, matching Jube's isolation guarantee.
- Jube's "Landlord" concept maps to mw-core's super_admin role in admin_users.
- Per-tenant activation rules, entity models, and model versions give full
  customization without shared config contamination.
