-- 0010_chat_session_read_at down: drop the read cursor added by the up migration. -- SQLite DROP COLUMN (3.35+) is already relied on by 0006/0007/0009, and read_at is -- not referenced by any index, view or constraint, so a plain drop is safe. The -- rolled-back state is the pre-D4 one: no unread badge data at all (the cursor is -- derived display state, not data a session needs to stay valid). The backfilled -- values cannot be restored by a re-up beyond the newest-message rule, which is -- exactly the upgrade default the up migration applies. ALTER TABLE chat_sessions DROP COLUMN read_at;