Skip to content

Commit dbf5b0b

Browse files
authored
Remove the trigger added in #18260 and then reverted (#18373)
See #18260 This is useful for anyone who tried Synapse v1.129.0rc1 out Fixes #18349 To test: - checkout v1.129.0rc1 and start - check that the events table has the trigger (`\dS events` with postgres) - checkout this PR and start - check that the events table doesn't have the trigger anymore
1 parent b2f12d2 commit dbf5b0b

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

changelog.d/18373.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Revert "Add total event, unencrypted message, and e2ee event counts to stats reporting".

synapse/storage/schema/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020
#
2121

22-
SCHEMA_VERSION = 91 # remember to update the list below when updating
22+
SCHEMA_VERSION = 92 # remember to update the list below when updating
2323
"""Represents the expectations made by the codebase about the database schema
2424
2525
This should be incremented whenever the codebase changes its requirements on the
@@ -162,6 +162,12 @@
162162
Changes in SCHEMA_VERSION = 90
163163
- Add a column `participant` to `room_memberships` table
164164
- Add background update to delete unreferenced state groups.
165+
166+
Changes in SCHEMA_VERSION = 91
167+
- Add a `sha256` column to the `local_media_repository` and `remote_media_cache` tables.
168+
169+
Changes in SCHEMA_VERSION = 92
170+
- Cleaned up a trigger that was added in #18260 and then reverted.
165171
"""
166172

167173

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--
2+
-- This file is licensed under the Affero General Public License (AGPL) version 3.
3+
--
4+
-- Copyright (C) 2025 New Vector, Ltd
5+
--
6+
-- This program is free software: you can redistribute it and/or modify
7+
-- it under the terms of the GNU Affero General Public License as
8+
-- published by the Free Software Foundation, either version 3 of the
9+
-- License, or (at your option) any later version.
10+
--
11+
-- See the GNU Affero General Public License for more details:
12+
-- <https://www.gnu.org/licenses/agpl-3.0.html>.
13+
14+
-- Removes the trigger that was added in #18260 and then reverted
15+
DROP TRIGGER IF EXISTS event_stats_increment_counts_trigger ON events;
16+
DROP FUNCTION IF EXISTS event_stats_increment_counts();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--
2+
-- This file is licensed under the Affero General Public License (AGPL) version 3.
3+
--
4+
-- Copyright (C) 2025 New Vector, Ltd
5+
--
6+
-- This program is free software: you can redistribute it and/or modify
7+
-- it under the terms of the GNU Affero General Public License as
8+
-- published by the Free Software Foundation, either version 3 of the
9+
-- License, or (at your option) any later version.
10+
--
11+
-- See the GNU Affero General Public License for more details:
12+
-- <https://www.gnu.org/licenses/agpl-3.0.html>.
13+
14+
-- Removes the trigger that was added in #18260 and then reverted
15+
DROP TRIGGER IF EXISTS event_stats_events_insert_trigger;
16+
DROP TRIGGER IF EXISTS event_stats_events_delete_trigger;

0 commit comments

Comments
 (0)