pub const MIGRATION_V13: &str = r#"
DROP TABLE IF EXISTS session_events;
CREATE TABLE session_events (
id INTEGER PRIMARY KEY AUTOINCREMENT,
rovenue_id TEXT NOT NULL,
kind TEXT NOT NULL,
occurred_at TEXT NOT NULL,
duration_ms INTEGER
);
CREATE INDEX idx_session_events_id ON session_events(id);
DROP TABLE IF EXISTS attribute_mutations;
CREATE TABLE attribute_mutations (
id INTEGER PRIMARY KEY AUTOINCREMENT,
rovenue_id TEXT NOT NULL,
key TEXT NOT NULL,
value TEXT
);
CREATE INDEX idx_attribute_mutations_id ON attribute_mutations(id);
UPDATE schema_meta SET version = 13;
"#;Expand description
Session events and attribute mutations carry the wire identity they were
recorded under, so each drains under its own subscriber and log_out
has nothing to discard (it used to clear both, losing whatever the 30 s
flush had not sent yet). Recreated rather than altered: rows buffered
before this carry no identity to post them under.