diff options
Diffstat (limited to 'sql/mysql.new.sql')
-rw-r--r-- | sql/mysql.new.sql | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/mysql.new.sql b/sql/mysql.new.sql index b29a003eb..ed4f93348 100644 --- a/sql/mysql.new.sql +++ b/sql/mysql.new.sql @@ -76,6 +76,8 @@ CREATE TABLE sr_group ( PRIMARY KEY (server_host(191), name) ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +CREATE UNIQUE INDEX i_sr_group_sh_name ON sr_group(server_host(191), name); + CREATE TABLE sr_user ( jid varchar(191) NOT NULL, server_host varchar(191) NOT NULL, @@ -84,6 +86,7 @@ CREATE TABLE sr_user ( PRIMARY KEY (server_host(191), jid, grp) ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +CREATE UNIQUE INDEX i_sr_user_sh_jid_group ON sr_group(server_host(191), jid, grp); CREATE INDEX i_sr_user_sh_jid ON sr_user(server_host(191), jid); CREATE INDEX i_sr_user_sh_grp ON sr_user(server_host(191), grp); |