Add a unique constraint on the room hosts table
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user