More missing indexes
This commit is contained in:
parent
dacf36d05a
commit
eb07089088
2 changed files with 6 additions and 1 deletions
|
@ -33,7 +33,8 @@ CREATE TABLE IF NOT EXISTS `gserver` (
|
||||||
`next_contact` datetime DEFAULT '0001-01-01 00:00:00' COMMENT 'Next connection request',
|
`next_contact` datetime DEFAULT '0001-01-01 00:00:00' COMMENT 'Next connection request',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `nurl` (`nurl`(190)),
|
UNIQUE INDEX `nurl` (`nurl`(190)),
|
||||||
INDEX `next_contact` (`next_contact`)
|
INDEX `next_contact` (`next_contact`),
|
||||||
|
INDEX `network` (`network`)
|
||||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Global servers';
|
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Global servers';
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -89,6 +90,7 @@ CREATE TABLE IF NOT EXISTS `user` (
|
||||||
INDEX `nickname` (`nickname`(32)),
|
INDEX `nickname` (`nickname`(32)),
|
||||||
INDEX `parent-uid` (`parent-uid`),
|
INDEX `parent-uid` (`parent-uid`),
|
||||||
INDEX `guid` (`guid`),
|
INDEX `guid` (`guid`),
|
||||||
|
INDEX `email` (`email`(64)),
|
||||||
FOREIGN KEY (`parent-uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
|
FOREIGN KEY (`parent-uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
|
||||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='The local users';
|
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='The local users';
|
||||||
|
|
||||||
|
@ -193,6 +195,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
|
||||||
INDEX `network_uid_lastupdate` (`network`,`uid`,`last-update`),
|
INDEX `network_uid_lastupdate` (`network`,`uid`,`last-update`),
|
||||||
INDEX `uid_network_self_lastupdate` (`uid`,`network`,`self`,`last-update`),
|
INDEX `uid_network_self_lastupdate` (`uid`,`network`,`self`,`last-update`),
|
||||||
INDEX `uid_lastitem` (`uid`,`last-item`),
|
INDEX `uid_lastitem` (`uid`,`last-item`),
|
||||||
|
INDEX `baseurl` (`baseurl`(64)),
|
||||||
INDEX `gsid` (`gsid`),
|
INDEX `gsid` (`gsid`),
|
||||||
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE,
|
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE,
|
||||||
FOREIGN KEY (`gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
|
FOREIGN KEY (`gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
|
||||||
|
|
|
@ -91,6 +91,7 @@ return [
|
||||||
"PRIMARY" => ["id"],
|
"PRIMARY" => ["id"],
|
||||||
"nurl" => ["UNIQUE", "nurl(190)"],
|
"nurl" => ["UNIQUE", "nurl(190)"],
|
||||||
"next_contact" => ["next_contact"],
|
"next_contact" => ["next_contact"],
|
||||||
|
"network" => ["network"],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"user" => [
|
"user" => [
|
||||||
|
@ -253,6 +254,7 @@ return [
|
||||||
"network_uid_lastupdate" => ["network", "uid", "last-update"],
|
"network_uid_lastupdate" => ["network", "uid", "last-update"],
|
||||||
"uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
|
"uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
|
||||||
"uid_lastitem" => ["uid", "last-item"],
|
"uid_lastitem" => ["uid", "last-item"],
|
||||||
|
"baseurl" => ["baseurl(64)"],
|
||||||
"gsid" => ["gsid"]
|
"gsid" => ["gsid"]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue