summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-29 14:59:52 +0100
committerErik Johnston <erik@matrix.org>2014-09-29 14:59:52 +0100
commit3ccb17ce592d7e75e0bd0237c347d64f63d5eb10 (patch)
treec5931cd53ad04a32430a51afcb8b7a06ea88920d /synapse/storage/schema
parentAdd auth check to test if a user is an admin or not. (diff)
downloadsynapse-3ccb17ce592d7e75e0bd0237c347d64f63d5eb10.tar.xz
SYN-48: Implement WHOIS rest servlet
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r--synapse/storage/schema/delta/v5.sql3
-rw-r--r--synapse/storage/schema/users.sql3
2 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/schema/delta/v5.sql b/synapse/storage/schema/delta/v5.sql
index f5a667a250..af9df11aa9 100644
--- a/synapse/storage/schema/delta/v5.sql
+++ b/synapse/storage/schema/delta/v5.sql
@@ -2,9 +2,10 @@
 CREATE TABLE IF NOT EXISTS user_ips (
     user TEXT NOT NULL,
     access_token TEXT NOT NULL,
+    device_id TEXT,
     ip TEXT NOT NULL,
     user_agent TEXT NOT NULL,
-    last_used INTEGER NOT NULL,
+    last_seen INTEGER NOT NULL,
     CONSTRAINT user_ip UNIQUE (user, access_token, ip, user_agent) ON CONFLICT REPLACE
 );
 
diff --git a/synapse/storage/schema/users.sql b/synapse/storage/schema/users.sql
index d96dd9f075..8244f733bd 100644
--- a/synapse/storage/schema/users.sql
+++ b/synapse/storage/schema/users.sql
@@ -34,9 +34,10 @@ CREATE TABLE IF NOT EXISTS access_tokens(
 CREATE TABLE IF NOT EXISTS user_ips (
     user TEXT NOT NULL,
     access_token TEXT NOT NULL,
+    device_id TEXT,
     ip TEXT NOT NULL,
     user_agent TEXT NOT NULL,
-    last_used INTEGER NOT NULL,
+    last_seen INTEGER NOT NULL,
     CONSTRAINT user_ip UNIQUE (user, access_token, ip, user_agent) ON CONFLICT REPLACE
 );