Add a hash column to messages table computed from SHA-256(created_at + content) to ensure message integrity. Existing messages get backfilled during migration. All messages now show copy and permalink buttons on hover, with hash-based URL fragments that auto-scroll and highlight the target message. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 lines
224 B
SQL
6 lines
224 B
SQL
-- Add SHA-256 integrity hash column to messages
|
|
ALTER TABLE messages ADD COLUMN hash TEXT;
|
|
|
|
-- Backfill hashes for existing messages is done in Rust (see main.rs)
|
|
-- because SQLite doesn't have a built-in SHA-256 function.
|