We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 756ebad commit 97ab7eaCopy full SHA for 97ab7ea
synapse/storage/schema/main/delta/92/04_thread_subscriptions.sql
@@ -29,7 +29,10 @@ CREATE TABLE thread_subscriptions (
29
30
CONSTRAINT thread_subscriptions_fk_rooms
31
FOREIGN KEY (room_id)
32
- REFERENCES rooms(room_id),
+ -- When we delete a room, we should already have deleted all the events in that room
33
+ -- and so there shouldn't be any subscriptions left in that room.
34
+ -- So the `ON DELETE CASCADE` should be optional, but included anyway for good measure.
35
+ REFERENCES rooms(room_id) ON DELETE CASCADE,
36
37
CONSTRAINT thread_subscriptions_fk_events
38
FOREIGN KEY (event_id)
0 commit comments