mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 22:33:50 +01:00
Add unique index to group_rooms table
This commit is contained in:
parent
0d7c7fd907
commit
a8e2a3df32
2 changed files with 1 additions and 3 deletions
|
@ -466,8 +466,6 @@ class GroupsServerHandler(object):
|
||||||
group_id, and_exists=True, and_is_admin=requester_user_id
|
group_id, and_exists=True, and_is_admin=requester_user_id
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: Check if room has already been added
|
|
||||||
|
|
||||||
is_public = _parse_visibility_from_contents(content)
|
is_public = _parse_visibility_from_contents(content)
|
||||||
|
|
||||||
yield self.store.add_room_to_group(group_id, room_id, is_public=is_public)
|
yield self.store.add_room_to_group(group_id, room_id, is_public=is_public)
|
||||||
|
|
|
@ -52,7 +52,7 @@ CREATE TABLE group_rooms (
|
||||||
is_public BOOLEAN NOT NULL -- whether the room can be seen by everyone
|
is_public BOOLEAN NOT NULL -- whether the room can be seen by everyone
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX groups_rooms_g_idx ON group_rooms(group_id, room_id);
|
CREATE UNIQUE INDEX groups_rooms_g_idx ON group_rooms(group_id, room_id);
|
||||||
CREATE INDEX groups_rooms_r_idx ON group_rooms(room_id);
|
CREATE INDEX groups_rooms_r_idx ON group_rooms(room_id);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue