thermograph/infra/deploy/migrations/002-user-discord-dm.sql
Emi Griffith ae1d9bb534 Subtree-merge thermograph-infra (origin/main) into infra/
git-subtree-dir: infra
git-subtree-mainline: d6df04eab2
git-subtree-split: 99b4b3f78d
2026-07-22 22:01:11 -07:00

9 lines
523 B
SQL

-- Adds User.discord_dm for Discord DM alert opt-in (notify.py DM channel).
-- Same no-Alembic caveat as 001: create_all won't add a column to an existing
-- accounts DB. deploy/migrate-db.py applies this on every deploy; existing rows
-- default to 0 (DMs off) until the user opts in by linking Discord. To apply by
-- hand instead (back the DB up first):
--
-- sqlite3 /opt/thermograph/data/accounts.sqlite < deploy/migrations/002-user-discord-dm.sql
ALTER TABLE user ADD COLUMN discord_dm BOOLEAN NOT NULL DEFAULT 0;