Files
AstralRinth/migrations/20240319195753_threads-updates.sql
Geometrically decfcb6c27 Fix issue with moderator identities being revealed (#892)
* Fix issue with moderator identities being revealed

* Fix on multiple threads route

* Fix thread notifs

* Fix failing test

* fix thread messages returning nothing
2024-03-19 17:25:49 -07:00

9 lines
284 B
SQL

ALTER TABLE threads DROP COLUMN show_in_mod_inbox;
ALTER TABLE threads_messages ADD COLUMN hide_identity BOOLEAN default false NOT NULL;
UPDATE threads_messages
SET hide_identity = TRUE
FROM users
WHERE threads_messages.author_id = users.id
AND users.role IN ('moderator', 'admin');