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/v5.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/schema/delta/v5.sql b/synapse/storage/schema/delta/v5.sql
index 380eec6f35..f5a667a250 100644
--- a/synapse/storage/schema/delta/v5.sql
+++ b/synapse/storage/schema/delta/v5.sql
@@ -3,7 +3,9 @@ CREATE TABLE IF NOT EXISTS user_ips (
     user TEXT NOT NULL,
     access_token TEXT NOT NULL,
     ip TEXT NOT NULL,
-    CONSTRAINT user_ip UNIQUE (user, access_token, ip) ON CONFLICT IGNORE
+    user_agent TEXT NOT NULL,
+    last_used INTEGER NOT NULL,
+    CONSTRAINT user_ip UNIQUE (user, access_token, ip, user_agent) ON CONFLICT REPLACE
 );
 
 CREATE INDEX IF NOT EXISTS user_ips_user ON user_ips(user);