]> git.mxchange.org Git - friendica.git/commitdiff
More missing indexes
authorMichael <heluecht@pirati.ca>
Sun, 21 Feb 2021 16:43:06 +0000 (16:43 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 21 Feb 2021 16:43:06 +0000 (16:43 +0000)
database.sql
static/dbstructure.config.php

index 602fe08b2dce6d30b0146dbb48aa7669a62722ff..ca9fc03201d0fe190a305aa69ca425070aa74072 100644 (file)
@@ -33,7 +33,8 @@ CREATE TABLE IF NOT EXISTS `gserver` (
        `next_contact` datetime DEFAULT '0001-01-01 00:00:00' COMMENT 'Next connection request',
         PRIMARY KEY(`id`),
         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';
 
 --
@@ -89,6 +90,7 @@ CREATE TABLE IF NOT EXISTS `user` (
         INDEX `nickname` (`nickname`(32)),
         INDEX `parent-uid` (`parent-uid`),
         INDEX `guid` (`guid`),
+        INDEX `email` (`email`(64)),
        FOREIGN KEY (`parent-uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
 ) 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 `uid_network_self_lastupdate` (`uid`,`network`,`self`,`last-update`),
         INDEX `uid_lastitem` (`uid`,`last-item`),
+        INDEX `baseurl` (`baseurl`(64)),
         INDEX `gsid` (`gsid`),
        FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE,
        FOREIGN KEY (`gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
index 2185ce3c3b8c776519d8f28b3df1275f82eb8da3..79c4fb62b9d842bc68fbd44dbf528af40bb36f8e 100644 (file)
@@ -91,6 +91,7 @@ return [
                        "PRIMARY" => ["id"],
                        "nurl" => ["UNIQUE", "nurl(190)"],
                        "next_contact" => ["next_contact"],
+                       "network" => ["network"],
                ]
        ],
        "user" => [
@@ -253,6 +254,7 @@ return [
                        "network_uid_lastupdate" => ["network", "uid", "last-update"],
                        "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
                        "uid_lastitem" => ["uid", "last-item"],
+                       "baseurl" => ["baseurl(64)"],
                        "gsid" => ["gsid"]
                ]
        ],