Fix schema delta to not take as long on large servers (#10227)

Introduced in #6739
pull/10238/head
Erik Johnston 2021-06-22 12:00:45 +01:00 committed by GitHub
parent 34db6bb9f5
commit 33701dc116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1 @@
Implement "room knocking" as per [MSC2403](https://github.com/matrix-org/matrix-doc/pull/2403). Contributed by Sorunome and anoa.

View File

@ -13,5 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
ALTER TABLE room_stats_current ADD COLUMN knocked_members INT NOT NULL DEFAULT '0'; -- Existing rows will default to NULL, so anything reading from these tables
ALTER TABLE room_stats_historical ADD COLUMN knocked_members BIGINT NOT NULL DEFAULT '0'; -- needs to interpret NULL as 0. This is fine here as no existing rooms can have
-- any knocked members.
ALTER TABLE room_stats_current ADD COLUMN knocked_members INT;
ALTER TABLE room_stats_historical ADD COLUMN knocked_members BIGINT;