mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Add missing indexes to sql sr_group tables
This commit is contained in:
parent
16af8a4739
commit
95fa43aa96
@ -73,6 +73,8 @@ CREATE TABLE sr_group (
|
|||||||
PRIMARY KEY (server_host, name)
|
PRIMARY KEY (server_host, name)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX i_sr_group_sh_name ON sr_group (server_host, name);
|
||||||
|
|
||||||
CREATE TABLE sr_user (
|
CREATE TABLE sr_user (
|
||||||
jid text NOT NULL,
|
jid text NOT NULL,
|
||||||
server_host text NOT NULL,
|
server_host text NOT NULL,
|
||||||
@ -81,6 +83,7 @@ CREATE TABLE sr_user (
|
|||||||
PRIMARY KEY (server_host, jid, grp)
|
PRIMARY KEY (server_host, jid, grp)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX i_sr_user_sh_jid_grp ON sr_user (server_host, jid, grp);
|
||||||
CREATE INDEX i_sr_user_sh_jid ON sr_user (server_host, jid);
|
CREATE INDEX i_sr_user_sh_jid ON sr_user (server_host, jid);
|
||||||
CREATE INDEX i_sr_user_sh_grp ON sr_user (server_host, grp);
|
CREATE INDEX i_sr_user_sh_grp ON sr_user (server_host, grp);
|
||||||
|
|
||||||
|
@ -65,6 +65,8 @@ CREATE TABLE sr_group (
|
|||||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX i_sr_group_name ON sr_group (name);
|
||||||
|
|
||||||
CREATE TABLE sr_user (
|
CREATE TABLE sr_user (
|
||||||
jid text NOT NULL,
|
jid text NOT NULL,
|
||||||
grp text NOT NULL,
|
grp text NOT NULL,
|
||||||
|
@ -76,6 +76,8 @@ CREATE TABLE sr_group (
|
|||||||
PRIMARY KEY (server_host(191), name)
|
PRIMARY KEY (server_host(191), name)
|
||||||
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) 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 (
|
CREATE TABLE sr_user (
|
||||||
jid varchar(191) NOT NULL,
|
jid varchar(191) NOT NULL,
|
||||||
server_host 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)
|
PRIMARY KEY (server_host(191), jid, grp)
|
||||||
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) 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_jid ON sr_user(server_host(191), jid);
|
||||||
CREATE INDEX i_sr_user_sh_grp ON sr_user(server_host(191), grp);
|
CREATE INDEX i_sr_user_sh_grp ON sr_user(server_host(191), grp);
|
||||||
|
|
||||||
|
@ -68,6 +68,8 @@ CREATE TABLE sr_group (
|
|||||||
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX i_sr_group_name ON sr_group(name);
|
||||||
|
|
||||||
CREATE TABLE sr_user (
|
CREATE TABLE sr_user (
|
||||||
jid varchar(191) NOT NULL,
|
jid varchar(191) NOT NULL,
|
||||||
grp varchar(191) NOT NULL,
|
grp varchar(191) NOT NULL,
|
||||||
|
@ -218,6 +218,8 @@ CREATE TABLE sr_group (
|
|||||||
PRIMARY KEY (server_host, name)
|
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 (
|
CREATE TABLE sr_user (
|
||||||
jid text NOT NULL,
|
jid text NOT NULL,
|
||||||
server_host text NOT NULL,
|
server_host text NOT NULL,
|
||||||
@ -226,6 +228,7 @@ CREATE TABLE sr_user (
|
|||||||
PRIMARY KEY (server_host, jid, grp)
|
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_jid ON sr_user USING btree (server_host, jid);
|
||||||
CREATE INDEX i_sr_user_sh_grp ON sr_user USING btree (server_host, grp);
|
CREATE INDEX i_sr_user_sh_grp ON sr_user USING btree (server_host, grp);
|
||||||
|
|
||||||
|
@ -69,6 +69,8 @@ CREATE TABLE sr_group (
|
|||||||
created_at TIMESTAMP NOT NULL DEFAULT now()
|
created_at TIMESTAMP NOT NULL DEFAULT now()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX i_sr_group_name ON sr_group USING btree (name);
|
||||||
|
|
||||||
CREATE TABLE sr_user (
|
CREATE TABLE sr_user (
|
||||||
jid text NOT NULL,
|
jid text NOT NULL,
|
||||||
grp text NOT NULL,
|
grp text NOT NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user