summary refs log tree commit diff
path: root/synapse/storage/schema/full_schemas
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-14 13:54:09 +0100
committerErik Johnston <erik@matrix.org>2015-04-14 13:54:09 +0100
commit5a95cd444297dfc2aab98259d6fc6a07bed837b9 (patch)
tree58ab61a1d66d15ad6a0274de1fc98013d4dd2e35 /synapse/storage/schema/full_schemas
parentAdd support for postgres instead of mysql. Change sql accourdingly. blob + va... (diff)
downloadsynapse-5a95cd444297dfc2aab98259d6fc6a07bed837b9.tar.xz
Rename user_ips.user -> user_id
Diffstat (limited to 'synapse/storage/schema/full_schemas')
-rw-r--r--synapse/storage/schema/full_schemas/16/users.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/schema/full_schemas/16/users.sql b/synapse/storage/schema/full_schemas/16/users.sql
index 267284d07d..006b249fc0 100644
--- a/synapse/storage/schema/full_schemas/16/users.sql
+++ b/synapse/storage/schema/full_schemas/16/users.sql
@@ -30,7 +30,7 @@ CREATE TABLE IF NOT EXISTS access_tokens(
 );
 
 CREATE TABLE IF NOT EXISTS user_ips (
-    user VARCHAR(150) NOT NULL,
+    user_id VARCHAR(150) NOT NULL,
     access_token VARCHAR(150) NOT NULL,
     device_id VARCHAR(150),
     ip VARCHAR(150) NOT NULL,
@@ -38,5 +38,5 @@ CREATE TABLE IF NOT EXISTS user_ips (
     last_seen BIGINT NOT NULL
 );
 
-CREATE INDEX IF NOT EXISTS user_ips_user ON user_ips(user);
-CREATE INDEX IF NOT EXISTS user_ips_user_ip ON user_ips(user, access_token, ip);
+CREATE INDEX user_ips_user ON user_ips(user_id);
+CREATE INDEX user_ips_user_ip ON user_ips(user_id, access_token, ip);