New index

This commit is contained in:
Michael 2022-05-05 08:40:50 +00:00
parent 4d359b7de1
commit 2a4b5b4cb4
3 changed files with 3 additions and 0 deletions

View file

@ -1191,6 +1191,7 @@ CREATE TABLE IF NOT EXISTS `post-media` (
`publisher-image` varbinary(255) COMMENT 'Image of the publisher of the media', `publisher-image` varbinary(255) COMMENT 'Image of the publisher of the media',
PRIMARY KEY(`id`), PRIMARY KEY(`id`),
UNIQUE INDEX `uri-id-url` (`uri-id`,`url`), 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 FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Attached media'; ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Attached media';

View file

@ -35,6 +35,7 @@ Indexes
| ---------- | ------------------- | | ---------- | ------------------- |
| PRIMARY | id | | PRIMARY | id |
| uri-id-url | UNIQUE, uri-id, url | | uri-id-url | UNIQUE, uri-id, url |
| uri-id-id | uri-id, id |
Foreign Keys Foreign Keys
------------ ------------

View file

@ -1230,6 +1230,7 @@ return [
"indexes" => [ "indexes" => [
"PRIMARY" => ["id"], "PRIMARY" => ["id"],
"uri-id-url" => ["UNIQUE", "uri-id", "url"], "uri-id-url" => ["UNIQUE", "uri-id", "url"],
"uri-id-id" => ["uri-id", "id"],
] ]
], ],
"post-question" => [ "post-question" => [