+/- table definition

Query

CREATE TABLE email_reply_drafts  (
  id TEXT PRIMARY KEY,
  message_id TEXT NOT NULL,
  thread_key TEXT NOT NULL,
  to_email TEXT NOT NULL,
  subject TEXT NOT NULL,
  text_body TEXT NOT NULL,
  confidence REAL NOT NULL DEFAULT 0.0,
  rationale TEXT,
  model TEXT,
  status TEXT NOT NULL CHECK (status IN ('drafted','suppressed','queued','sent','discarded')),
  source_event_id TEXT NOT NULL,
  created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),
  updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),
  FOREIGN KEY (message_id) REFERENCES email_messages(message_id) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED,
  FOREIGN KEY (thread_key) REFERENCES email_threads(thread_key) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED,
  FOREIGN KEY (source_event_id) REFERENCES events(id) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED
)
Use Shift + Up/Down to navigate recently-executed queries