Files
tranquil-pds/migrations/20260921_drop_comms_metadata.sql
LewisandTangled 7098e8f5a9 db: outbound message type instead of stinkier comms enqueue
Typing a struct for enqueuing messages out to comms.

Also, after recent PRs showing me the way in which the
previously unused metadata field would possibly be used going
forward, I think I deem it too much of a hazard to be
left alive, hence removing it and migrating any inflight
comms to extract html_body (only existing use for it).

Lewis: May this revision serve well! <did:plc:3fwecdnvtcscjnrx2p4n7alz>
2026-10-15 18:21:22 +00:00

4 lines
193 B
SQL

ALTER TABLE comms_queue ADD COLUMN html_body TEXT;
UPDATE comms_queue SET html_body = metadata->>'html_body' WHERE metadata IS NOT NULL;
ALTER TABLE comms_queue DROP COLUMN IF EXISTS metadata;