diff options
Diffstat (limited to 'sql/pg.new.sql')
-rw-r--r-- | sql/pg.new.sql | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/pg.new.sql b/sql/pg.new.sql index d5b1f16bf..8a35ec6c9 100644 --- a/sql/pg.new.sql +++ b/sql/pg.new.sql @@ -218,6 +218,8 @@ CREATE TABLE sr_group ( PRIMARY KEY (server_host, name) ); +CREATE UNIQUE INDEX i_sr_group_sh_name ON sr_group USING btree (server_host, name); + CREATE TABLE sr_user ( jid text NOT NULL, server_host text NOT NULL, @@ -226,6 +228,7 @@ CREATE TABLE sr_user ( PRIMARY KEY (server_host, jid, grp) ); +CREATE UNIQUE INDEX i_sr_user_sh_jid_grp ON sr_user USING btree (server_host, jid, grp); CREATE INDEX i_sr_user_sh_jid ON sr_user USING btree (server_host, jid); CREATE INDEX i_sr_user_sh_grp ON sr_user USING btree (server_host, grp); |