1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-09-15 22:21:07 +03:00
Files
authentication-service/crates/storage-pg/migrations/20240220141353_nonunique_compat_device_id.sql
Quentin Gliech 03b6ad7138 Remove the unique constraint on device IDs on compatibility sessions
In OAuth 2.0 sessions, we can have multiple sessions for the same device
anyway, so this constraint doesn't exactly make sense.

Fixes #2033
Fixes #2312
2024-02-20 15:50:20 +01:00

18 lines
776 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.
-- Drops the unique constraint on the device_id column in the compat_sessions table
ALTER TABLE compat_sessions
DROP CONSTRAINT compat_sessions_device_id_unique;