Backfill from rater/user's account_id (not the step's account_id). This is an explicit design decision — step rating data is attributed to the account that performed the rating. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tables: session_branches, session_handoffs, fork_points, ai_session_steps, ai_suggestions Backfill: session_id → ai_sessions.account_id (all except ai_suggestions which uses user_id → users.account_id) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Migration sequence: add nullable → backfill via user_id/ai_session chain → verify zero NULLs → SET NOT NULL → CREATE INDEX. Tables: sessions, attachments, session_supporting_data, session_resolution_outputs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>