summary refs log tree commit diff
path: root/synapse/storage/schema/delta
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/schema/delta')
-rw-r--r--synapse/storage/schema/delta/17/user_threepids.sql10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/storage/schema/delta/17/user_threepids.sql b/synapse/storage/schema/delta/17/user_threepids.sql
new file mode 100644
index 0000000000..fa16589019
--- /dev/null
+++ b/synapse/storage/schema/delta/17/user_threepids.sql
@@ -0,0 +1,10 @@
+CREATE TABLE user_threepids (
+    id INTEGER PRIMARY KEY NOT NULL,
+    user TEXT NOT NULL,
+    medium TEXT NOT NULL,
+    address TEXT NOT NULL,
+    validated_at INTEGER NOT NULL,
+    added_at INTEGER NOT NULL,
+    CONSTRAINT user_medium_address UNIQUE (user, medium, address) ON CONFLICT REPLACE
+);
+CREATE INDEX user_threepids_user ON user_threepids(user);