]> git.mxchange.org Git - friendica.git/commitdiff
Changes:
authorRoland Häder <roland@mxchange.org>
Sun, 19 Jun 2022 08:48:47 +0000 (10:48 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 19 Jun 2022 08:50:06 +0000 (10:50 +0200)
- MySQL index on BLOB/TEXT can only be partial (e.g.: `column`(length))

database.sql
doc/database/db_post-media.md
static/dbstructure.config.php

index 76b6423520ac570b441c57da7dd02ecec852cb82..8f0e41cecf4c8e9081dfd27511f4cad59a8d0399 100644 (file)
@@ -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';
index d6d9a0655217e0c917d7bb9b4b6a2b9efc062e20..0563f5ee89435ec496af10291882b938d3b2c827 100644 (file)
@@ -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
 ------------
index e4cfe2535d269d9b3887a946321d85b0ee330fdc..fe7f50f17c0fa90582f5fdfa95b6457d59c60af5 100644 (file)
@@ -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"],
                ]
        ],