0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 21:13:54 +01:00

wait for current_state_events_membership before delete_old_current_state_events (#6924)

This commit is contained in:
Richard van der Hoff 2020-02-17 11:30:50 +00:00 committed by Richard van der Hoff
parent 7b8d654a61
commit d2455ec3aa
2 changed files with 6 additions and 2 deletions

1
changelog.d/6924.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a bug introduced in Synapse 1.10.0 which would cause room state to be cleared in the database if Synapse was upgraded direct from 1.2.1 or earlier to 1.10.0.

View file

@ -15,5 +15,8 @@
-- Add background update to go and delete current state events for rooms the
-- server is no longer in.
INSERT into background_updates (update_name, progress_json)
VALUES ('delete_old_current_state_events', '{}');
--
-- this relies on the 'membership' column of current_state_events, so make sure
-- that's populated first!
INSERT into background_updates (update_name, progress_json, depends_on)
VALUES ('delete_old_current_state_events', '{}', 'current_state_events_membership');