From 5a95cd444297dfc2aab98259d6fc6a07bed837b9 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 14 Apr 2015 13:54:09 +0100 Subject: Rename user_ips.user -> user_id --- synapse/storage/schema/delta/16/users.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'synapse/storage/schema/delta/16') diff --git a/synapse/storage/schema/delta/16/users.sql b/synapse/storage/schema/delta/16/users.sql index f04705cd77..db27bdca02 100644 --- a/synapse/storage/schema/delta/16/users.sql +++ b/synapse/storage/schema/delta/16/users.sql @@ -36,7 +36,7 @@ ALTER TABLE new_users RENAME TO users; -- Remove UNIQUE constraint from `user_ips` table CREATE TABLE IF NOT EXISTS new_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, @@ -51,6 +51,6 @@ DROP TABLE user_ips; ALTER TABLE new_user_ips RENAME TO user_ips; -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 IF NOT EXISTS user_ips_user ON user_ips(user_id); +CREATE INDEX IF NOT EXISTS user_ips_user_ip ON user_ips(user_id, access_token, ip); -- cgit 1.4.1