1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +03:00
Files
authentication-service/crates/storage-pg/migrations/20240718075125_sessions_active_index.sql

20 lines
949 B
SQL

-- Copyright 2024 The Matrix.org Foundation C.I.C.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Adds an index on the last_active_at column of the sessions tables
CREATE INDEX "compat_sessions_last_active_at_idx" ON "compat_sessions" ("last_active_at");
CREATE INDEX "oauth2_sessions_last_active_at_idx" ON "oauth2_sessions" ("last_active_at");
CREATE INDEX "user_sessions_last_active_at_idx" ON "user_sessions" ("last_active_at");