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

Commit 4db7862

Browse files
authored
Drop unused tables from groups/communities. (#12967)
These tables have been unused since Synapse v1.61.0, although schema version 72 was added in Synapse v1.62.0.
1 parent 90e9b4f commit 4db7862

File tree

4 files changed

+36
-19
lines changed

4 files changed

+36
-19
lines changed

changelog.d/12967.removal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Drop tables used for groups/communities.

synapse/_scripts/synapse_port_db.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -166,22 +166,6 @@
166166
"ui_auth_sessions",
167167
"ui_auth_sessions_credentials",
168168
"ui_auth_sessions_ips",
169-
# Groups/communities is no longer supported.
170-
"group_attestations_remote",
171-
"group_attestations_renewals",
172-
"group_invites",
173-
"group_roles",
174-
"group_room_categories",
175-
"group_rooms",
176-
"group_summary_roles",
177-
"group_summary_room_categories",
178-
"group_summary_rooms",
179-
"group_summary_users",
180-
"group_users",
181-
"groups",
182-
"local_group_membership",
183-
"local_group_updates",
184-
"remote_profile_cache",
185169
}
186170

187171

synapse/storage/schema/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,14 @@
7474
7575
Changes in SCHEMA_VERSION = 72:
7676
- event_edges.(room_id, is_state) are no longer written to.
77+
- Tables related to groups are dropped.
7778
"""
7879

7980

8081
SCHEMA_COMPAT_VERSION = (
81-
# We no longer maintain `event_edges.room_id`, so synapses with SCHEMA_VERSION < 71
82-
# will break.
83-
71
82+
# The groups tables are no longer accessible, so synapses with SCHEMA_VERSION < 72
83+
# could break.
84+
72
8485
)
8586
"""Limit on how far the synapse codebase can be rolled back without breaking db compat
8687
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
-- Remove the tables which powered the unspecced groups/communities feature.
17+
DROP TABLE IF EXISTS group_attestations_remote;
18+
DROP TABLE IF EXISTS group_attestations_renewals;
19+
DROP TABLE IF EXISTS group_invites;
20+
DROP TABLE IF EXISTS group_roles;
21+
DROP TABLE IF EXISTS group_room_categories;
22+
DROP TABLE IF EXISTS group_rooms;
23+
DROP TABLE IF EXISTS group_summary_roles;
24+
DROP TABLE IF EXISTS group_summary_room_categories;
25+
DROP TABLE IF EXISTS group_summary_rooms;
26+
DROP TABLE IF EXISTS group_summary_users;
27+
DROP TABLE IF EXISTS group_users;
28+
DROP TABLE IF EXISTS groups;
29+
DROP TABLE IF EXISTS local_group_membership;
30+
DROP TABLE IF EXISTS local_group_updates;
31+
DROP TABLE IF EXISTS remote_profile_cache;

0 commit comments

Comments
 (0)