SCHEMA_V9

Constant SCHEMA_V9 

Source
pub const SCHEMA_V9: &str = "
    ALTER TABLE raw ADD COLUMN request_id TEXT NOT NULL DEFAULT '';
    ALTER TABLE raw ADD COLUMN correlation_id TEXT NOT NULL DEFAULT '';
    CREATE INDEX IF NOT EXISTS idx_raw_correlation ON raw(correlation_id, ts_ms);
";
Expand description

Schema v9 (DW-093): add request_id and correlation_id columns to the raw table for business-metrics journey/funnel analytics. Both default to '' so pre-DW-093 rows and records that omit the fields land as empty (the journey query simply returns no rows for an empty correlation id). The correlation_id index supports the journey query (all raw rows for one correlation id, ordered by time). Uses ALTER TABLE (additive) so existing databases migrate in place.