mirror of
https://mau.dev/maunium/synapse.git
synced 2024-09-29 20:55:39 +00:00
Add forgotten schema delta (#17054)
This should have been in #17045. Whoops.
This commit is contained in:
parent
892cbd0624
commit
d40878451c
1
changelog.d/17054.misc
Normal file
1
changelog.d/17054.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Improve database performance by adding a missing index to `access_tokens.refresh_token_id`.
|
@ -2108,6 +2108,13 @@ class RegistrationBackgroundUpdateStore(RegistrationWorkerStore):
|
|||||||
unique=False,
|
unique=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.db_pool.updates.register_background_index_update(
|
||||||
|
update_name="access_tokens_refresh_token_id_idx",
|
||||||
|
index_name="access_tokens_refresh_token_id_idx",
|
||||||
|
table="access_tokens",
|
||||||
|
columns=("refresh_token_id",),
|
||||||
|
)
|
||||||
|
|
||||||
async def _background_update_set_deactivated_flag(
|
async def _background_update_set_deactivated_flag(
|
||||||
self, progress: JsonDict, batch_size: int
|
self, progress: JsonDict, batch_size: int
|
||||||
) -> int:
|
) -> int:
|
||||||
@ -2266,13 +2273,6 @@ class RegistrationStore(StatsStore, RegistrationBackgroundUpdateStore):
|
|||||||
):
|
):
|
||||||
super().__init__(database, db_conn, hs)
|
super().__init__(database, db_conn, hs)
|
||||||
|
|
||||||
self.db_pool.updates.register_background_index_update(
|
|
||||||
update_name="access_tokens_refresh_token_id_idx",
|
|
||||||
index_name="access_tokens_refresh_token_id_idx",
|
|
||||||
table="access_tokens",
|
|
||||||
columns=("refresh_token_id",),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._ignore_unknown_session_error = (
|
self._ignore_unknown_session_error = (
|
||||||
hs.config.server.request_token_inhibit_3pid_errors
|
hs.config.server.request_token_inhibit_3pid_errors
|
||||||
)
|
)
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
--
|
||||||
|
-- This file is licensed under the Affero General Public License (AGPL) version 3.
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2023 New Vector, Ltd
|
||||||
|
--
|
||||||
|
-- This program is free software: you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU Affero General Public License as
|
||||||
|
-- published by the Free Software Foundation, either version 3 of the
|
||||||
|
-- License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- See the GNU Affero General Public License for more details:
|
||||||
|
-- <https://www.gnu.org/licenses/agpl-3.0.html>.
|
||||||
|
|
||||||
|
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
|
||||||
|
(8404, 'access_tokens_refresh_token_id_idx', '{}');
|
Loading…
Reference in New Issue
Block a user