diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-03-12 21:47:14 +1100 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2019-03-12 21:47:14 +1100 |
commit | 10480c434881d9c38acc02c98ab4b85b98097870 (patch) | |
tree | 57db0f23ebdb990c0fff229515f596d207d0a2c9 /synapse/storage/schema | |
parent | fixup (diff) | |
download | synapse-10480c434881d9c38acc02c98ab4b85b98097870.tar.xz |
fixup
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r-- | synapse/storage/schema/delta/53/users_in_public_rooms.sql | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/synapse/storage/schema/delta/53/users_in_public_rooms.sql b/synapse/storage/schema/delta/53/users_in_public_rooms.sql index bd57fd778b..40adc98387 100644 --- a/synapse/storage/schema/delta/53/users_in_public_rooms.sql +++ b/synapse/storage/schema/delta/53/users_in_public_rooms.sql @@ -16,13 +16,20 @@ -- We don't need the old version of this table. DROP TABLE IF EXISTS users_in_public_rooms; +-- Old version of users_in_public_rooms +DROP TABLE IF EXISTS users_who_share_public_rooms; + -- Track what users are in public rooms. CREATE TABLE IF NOT EXISTS users_in_public_rooms ( - user_id TEXT NOT NULL + user_id TEXT NOT NULL, + room_id TEXT NOT NULL ); -CREATE UNIQUE INDEX users_in_public_rooms_u_idx ON users_in_public_rooms(user_id); +CREATE UNIQUE INDEX users_in_public_rooms_u_idx ON users_in_public_rooms(user_id, room_id); + +-- Track what users are publicly visible +CREATE TABLE IF NOT EXISTS publicly_visible_users ( + user_id TEXT NOT NULL +); --- Fill the table. -INSERT INTO background_updates (update_name, progress_json) VALUES - ('users_in_public_rooms_initial', '{}'); +CREATE UNIQUE INDEX publicly_visible_users_u_idx ON publicly_visible_users(user_id); |