diff options
author | Erik Johnston <lightportal@gmail.com> | 2014-08-24 11:28:03 +0100 |
---|---|---|
committer | Erik Johnston <lightportal@gmail.com> | 2014-08-24 11:29:29 +0100 |
commit | 9d86c8c7a68fdbfa49df8bb027a112158df40bb8 (patch) | |
tree | ddd9a624d90101291369778483f78c70e9fc26ad /synapse | |
parent | Encode unicode from json as utf-8. This was required to allow people to regis... (diff) | |
download | synapse-9d86c8c7a68fdbfa49df8bb027a112158df40bb8.tar.xz |
Add a unique constraint on the room hosts table
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/schema/im.sql | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/schema/im.sql b/synapse/storage/schema/im.sql index 7f4e758892..e92f21ef3b 100644 --- a/synapse/storage/schema/im.sql +++ b/synapse/storage/schema/im.sql @@ -98,5 +98,6 @@ CREATE TABLE IF NOT EXISTS rooms( CREATE TABLE IF NOT EXISTS room_hosts( room_id TEXT NOT NULL, - host TEXT NOT NULL + host TEXT NOT NULL, + CONSTRAINT room_hosts_uniq UNIQUE (room_id, host) ON CONFLICT IGNORE ); |