Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 7f92ac4

Browse files
Mathieu Veltensquahtx
Mathieu Velten
andauthored
Add a migration step to cleanup potential leftovers of bug 11833 (#12784)
Co-authored-by: Sean Quah <[email protected]>
1 parent b102118 commit 7f92ac4

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

changelog.d/12784.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Delete events from the `federation_inbound_events_staging` table when a room is purged through the admin API.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* Copyright 2022 The Matrix.org Foundation C.I.C
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
-- Clean up left over rows from bug #11833, which was fixed in #12770.
17+
DELETE FROM federation_inbound_events_staging WHERE room_id not in (
18+
SELECT room_id FROM rooms
19+
);

0 commit comments

Comments
 (0)