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

Commit 33701dc

Browse files
authored
Fix schema delta to not take as long on large servers (#10227)
Introduced in #6739
1 parent 34db6bb commit 33701dc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

changelog.d/10227.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Implement "room knocking" as per [MSC2403](https://github.com/matrix-org/matrix-doc/pull/2403). Contributed by Sorunome and anoa.

synapse/storage/schema/main/delta/59/11add_knock_members_to_stats.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@
1313
* limitations under the License.
1414
*/
1515

16-
ALTER TABLE room_stats_current ADD COLUMN knocked_members INT NOT NULL DEFAULT '0';
17-
ALTER TABLE room_stats_historical ADD COLUMN knocked_members BIGINT NOT NULL DEFAULT '0';
16+
-- Existing rows will default to NULL, so anything reading from these tables
17+
-- needs to interpret NULL as 0. This is fine here as no existing rooms can have
18+
-- any knocked members.
19+
ALTER TABLE room_stats_current ADD COLUMN knocked_members INT;
20+
ALTER TABLE room_stats_historical ADD COLUMN knocked_members BIGINT;

0 commit comments

Comments
 (0)