CREATE TABLE IF NOT EXISTS runtime_log_cleanup_audit (
    id TEXT PRIMARY KEY,
    tenant_id TEXT NOT NULL,
    actor_prefix TEXT NOT NULL,
    filename TEXT NOT NULL,
    action TEXT NOT NULL,
    size_before INTEGER NOT NULL,
    size_after INTEGER,
    detail_json TEXT,
    created_at TEXT NOT NULL
);

CREATE INDEX IF NOT EXISTS idx_runtime_log_cleanup_audit_tenant_created
    ON runtime_log_cleanup_audit (tenant_id, created_at DESC);
