Remove groups code from synapse_port_db. (#12899)

This commit is contained in:
Patrick Cloke 2022-06-03 12:13:35 -04:00 committed by GitHub
parent 01df5bacac
commit 6b46c3eb3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 15 deletions

View File

@ -0,0 +1 @@
Remove support for the non-standard groups/communities feature from Synapse.

View File

@ -102,14 +102,6 @@ BOOLEAN_COLUMNS = {
"devices": ["hidden"], "devices": ["hidden"],
"device_lists_outbound_pokes": ["sent"], "device_lists_outbound_pokes": ["sent"],
"users_who_share_rooms": ["share_private"], "users_who_share_rooms": ["share_private"],
"groups": ["is_public"],
"group_rooms": ["is_public"],
"group_users": ["is_public", "is_admin"],
"group_summary_rooms": ["is_public"],
"group_room_categories": ["is_public"],
"group_summary_users": ["is_public"],
"group_roles": ["is_public"],
"local_group_membership": ["is_publicised", "is_admin"],
"e2e_room_keys": ["is_verified"], "e2e_room_keys": ["is_verified"],
"account_validity": ["email_sent"], "account_validity": ["email_sent"],
"redactions": ["have_censored"], "redactions": ["have_censored"],
@ -175,6 +167,21 @@ IGNORED_TABLES = {
"ui_auth_sessions", "ui_auth_sessions",
"ui_auth_sessions_credentials", "ui_auth_sessions_credentials",
"ui_auth_sessions_ips", "ui_auth_sessions_ips",
# Groups/communities is no longer supported.
"group_attestations_remote",
"group_attestations_renewals",
"group_invites",
"group_roles",
"group_room_categories",
"group_rooms",
"group_summary_roles",
"group_summary_room_categories",
"group_summary_rooms",
"group_summary_users",
"group_users",
"groups",
"local_group_membership",
"local_group_updates",
} }

View File

@ -29,11 +29,6 @@ class GroupServerStore(SQLBaseStore):
db_conn: LoggingDatabaseConnection, db_conn: LoggingDatabaseConnection,
hs: "HomeServer", hs: "HomeServer",
): ):
database.updates.register_background_index_update( # Register a legacy groups background update as a no-op.
update_name="local_group_updates_index", database.updates.register_noop_background_update("local_group_updates_index")
index_name="local_group_updates_stream_id_index",
table="local_group_updates",
columns=("stream_id",),
unique=True,
)
super().__init__(database, db_conn, hs) super().__init__(database, db_conn, hs)