// v3: soft delete (#4) introduces deleted_at.
// last_recalled_at + recall_dismissed_at are pre-allocated for #6 (recall) —
// dormant until then to avoid a v4 migration round-trip.
import type Database from 'better-sqlite3';

export const version = 3;

export function up(db: Database.Database): void {
  db.exec(`
    ALTER TABLE notes ADD COLUMN deleted_at TEXT;
    ALTER TABLE notes ADD COLUMN last_recalled_at TEXT;
    ALTER TABLE notes ADD COLUMN recall_dismissed_at TEXT;
    CREATE INDEX IF NOT EXISTS idx_notes_deleted_at ON notes(deleted_at);
  `);
}
