]> git.mxchange.org Git - friendica.git/commitdiff
New index
authorMichael <heluecht@pirati.ca>
Thu, 5 May 2022 08:40:50 +0000 (08:40 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 5 May 2022 08:40:50 +0000 (08:40 +0000)
database.sql
doc/database/db_post-media.md
static/dbstructure.config.php

index 5aa9a5b706904387975ee9156384080a7685d2d0..93f9bbef7e7e334a0e9f3acf16f468ce592bc133 100644 (file)
@@ -1191,6 +1191,7 @@ CREATE TABLE IF NOT EXISTS `post-media` (
        `publisher-image` varbinary(255) COMMENT 'Image of the publisher of the media',
         PRIMARY KEY(`id`),
         UNIQUE INDEX `uri-id-url` (`uri-id`,`url`),
+        INDEX `uri-id-id` (`uri-id`,`id`),
        FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Attached media';
 
index e17a04e5fbb8d7421a4a414f070cdb3a0d982658..5c2a1bfd97eccce989d509818db94f4a61f3293a 100644 (file)
@@ -35,6 +35,7 @@ Indexes
 | ---------- | ------------------- |
 | PRIMARY    | id                  |
 | uri-id-url | UNIQUE, uri-id, url |
+| uri-id-id  | uri-id, id          |
 
 Foreign Keys
 ------------
index e3435989cf4586aa286372f22db00a5c6b47ec20..6d28b2914187da4d9602a3079ead0ac6c704d17e 100644 (file)
@@ -1230,6 +1230,7 @@ return [
                "indexes" => [
                        "PRIMARY" => ["id"],
                        "uri-id-url" => ["UNIQUE", "uri-id", "url"],
+                       "uri-id-id" => ["uri-id", "id"],
                ]
        ],
        "post-question" => [