From: Roland Häder Date: Sun, 19 Jun 2022 08:48:47 +0000 (+0200) Subject: Changes: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5f6943b0085c64ce753954b6ede587bbfbd98be6;p=friendica.git Changes: - MySQL index on BLOB/TEXT can only be partial (e.g.: `column`(length)) --- diff --git a/database.sql b/database.sql index 76b6423520..8f0e41cecf 100644 --- a/database.sql +++ b/database.sql @@ -1234,7 +1234,7 @@ CREATE TABLE IF NOT EXISTS `post-media` ( `publisher-name` varchar(255) COMMENT 'Name of the publisher of the media', `publisher-image` varbinary(255) COMMENT 'Image of the publisher of the media', PRIMARY KEY(`id`), - UNIQUE INDEX `uri-id-url` (`uri-id`,`url`), + UNIQUE INDEX `uri-id-url` (`uri-id`,`url`(512)), 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'; diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index d6d9a06552..0563f5ee89 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -31,11 +31,11 @@ Fields Indexes ------------ -| Name | Fields | -| ---------- | ------------------- | -| PRIMARY | id | -| uri-id-url | UNIQUE, uri-id, url | -| uri-id-id | uri-id, id | +| Name | Fields | +| ---------- | ------------------------ | +| PRIMARY | id | +| uri-id-url | UNIQUE, uri-id, url(512) | +| uri-id-id | uri-id, id | Foreign Keys ------------ diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index e4cfe2535d..fe7f50f17c 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -1272,7 +1272,7 @@ return [ ], "indexes" => [ "PRIMARY" => ["id"], - "uri-id-url" => ["UNIQUE", "uri-id", "url"], + "uri-id-url" => ["UNIQUE", "uri-id", "url(512)"], "uri-id-id" => ["uri-id", "id"], ] ],