Speed up access token cleanup with an index
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
-- no-transaction
|
||||
-- Copyright 2026 Element Creations Ltd.
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
-- Please see LICENSE in the repository root for full details.
|
||||
|
||||
-- This adds an index on the revoked_at field on oauth2_access_tokens to speed up cleaning them up
|
||||
CREATE INDEX CONCURRENTLY IF NOT EXISTS oauth_access_tokens_revoked_at_idx
|
||||
ON oauth2_access_tokens (revoked_at) WHERE revoked_at IS NOT NULL;
|
||||
Reference in New Issue
Block a user