-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syn2mas: Migrate threepids to MAS (#3878)
* Add a table to hold unsupported threepids * Migrate threepids from Synapse to MAS
- Loading branch information
1 parent
81a15c7
commit ee4f497
Showing
15 changed files
with
502 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
crates/storage-pg/migrations/20250124151529_unsupported_threepids_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-- Copyright 2025 New Vector Ltd. | ||
-- | ||
-- SPDX-License-Identifier: AGPL-3.0-only | ||
-- Please see LICENSE in the repository root for full details. | ||
|
||
|
||
|
||
-- Tracks third-party ID associations that have been verified but are | ||
-- not currently supported by MAS. | ||
-- This is currently used when importing third-party IDs from Synapse, | ||
-- which historically could verify at least phone numbers. | ||
-- E-mail associations will not be stored in this table because those are natively | ||
-- supported by MAS; see the `user_emails` table. | ||
|
||
CREATE TABLE user_unsupported_third_party_ids( | ||
-- The owner of the third-party ID assocation | ||
user_id UUID NOT NULL | ||
REFERENCES users(user_id) ON DELETE CASCADE, | ||
|
||
-- What type of association is this? | ||
medium TEXT NOT NULL, | ||
|
||
-- The address of the associated ID, e.g. a phone number or other identifier. | ||
address TEXT NOT NULL, | ||
|
||
-- When the association was created | ||
created_at TIMESTAMP WITH TIME ZONE NOT NULL, | ||
|
||
PRIMARY KEY (user_id, medium, address) | ||
); |
17 changes: 17 additions & 0 deletions
17
...syn2mas/.sqlx/query-b11590549fdd4cdcd36c937a353b5b37ab50db3505712c35610b822cda322b5b.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
...syn2mas/.sqlx/query-dfbd462f7874d3dae551f2a0328a853a8a7efccdc20b968d99d8c18deda8dd00.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.