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',
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';

View File

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

View File

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