-- Add tenant_id to regulatory_frameworks to support tenant-owned custom frameworks.
-- NULL tenant_id = system-wide (existing rows); non-NULL = owned by that tenant.

ALTER TABLE regulatory_frameworks
  ADD COLUMN tenant_id VARCHAR(36) NULL DEFAULT NULL AFTER id,
  ADD INDEX idx_rf_tenant (tenant_id),
  ADD CONSTRAINT fk_rf_tenant FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE;
