-- 0009_chat_session_pinned: pin a persistent chat session to the top of the session -- list (DevDocs/design/16 §2.2, Android 协同批次 ③a / D5). `pinned` is display/order -- metadata only: it never affects identity or permissions (project red line), and any -- session — the fixed main session or a sub session — may be pinned. -- -- The 0003 chat_sessions table already exists at this point, so ALTER ADD COLUMN is -- the correct, non-destructive step. The canonical schema (including this column) is -- also re-issued idempotently by internal/runtime/history.NewStore so a fresh -- in-memory store used by tests stays self-contained; the migration is the -- authoritative path for an existing database. ALTER TABLE chat_sessions ADD COLUMN pinned INTEGER NOT NULL DEFAULT 0;