-- Migration 000009: Default feature flags for Sprint 11 module toggles (E11-07).
-- Adds global defaults for the three module-level feature flags.
-- Tenant admins can override these per-tenant via PUT /v1/admin/flags/{name}.
--
-- pii_enabled:      controls whether PII anonymization runs on requests.
-- routing_enabled:  controls whether the dynamic routing engine is used.
-- billing_enabled:  controls whether cost tracking is recorded in audit logs.

INSERT INTO feature_flags (tenant_id, name, is_enabled)
VALUES
    (NULL, 'pii_enabled',      TRUE),
    (NULL, 'routing_enabled',  TRUE),
    (NULL, 'billing_enabled',  TRUE)
ON CONFLICT (tenant_id, name) DO NOTHING;
