Files
gogobee/migrate.sql
prosolis 298c7bb8f1 Expand sentiment to 10 categories, add DB maintenance job, update README
- Expand LLM sentiment classification from 3 to 10 categories: positive,
  negative, neutral, excited, sarcastic, frustrated, curious, grateful,
  humorous, supportive — with emoji reactions for each
- Add daily DB maintenance job at 03:00 UTC to purge stale caches,
  expired rate limits, old logs, and run SQLite optimize
- Add migrate.sql for upgrading existing databases
- Update README: add !sentiment command, maintenance job, rate limit
  config, in-memory message buffer docs, SDK migration history,
  remove references to previous private repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 20:46:18 -07:00

16 lines
693 B
SQL

-- Add expanded sentiment columns to sentiment_stats
ALTER TABLE sentiment_stats ADD COLUMN excited INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN sarcastic INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN frustrated INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN curious INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN grateful INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN humorous INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN supportive INTEGER DEFAULT 0;
-- Create generic API cache table
CREATE TABLE IF NOT EXISTS api_cache (
cache_key TEXT PRIMARY KEY,
data TEXT NOT NULL,
cached_at INTEGER DEFAULT (unixepoch())
);