thermograph/deploy/migrations/002-user-discord-dm.sql

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;