]> git.mxchange.org Git - friendica.git/commitdiff
New table for storing item content
authorMichael <heluecht@pirati.ca>
Sun, 24 Jun 2018 14:33:07 +0000 (14:33 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 24 Jun 2018 14:33:07 +0000 (14:33 +0000)
boot.php
src/Database/DBStructure.php

index 9bc02584c25ab0c277eaa903f27f5af3f3c5228f..ac21d108a3cd0c25a929ed77dd8ccde88fcd340b 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -41,7 +41,7 @@ define('FRIENDICA_PLATFORM',     'Friendica');
 define('FRIENDICA_CODENAME',     'The Tazmans Flax-lily');
 define('FRIENDICA_VERSION',      '2018.08-dev');
 define('DFRN_PROTOCOL_VERSION',  '2.23');
-define('DB_UPDATE_VERSION',      1270);
+define('DB_UPDATE_VERSION',      1271);
 define('NEW_UPDATE_ROUTINE_VERSION', 1170);
 
 /**
index a089ab8942e36e8dd9f91b9cb0c729b37c62d4a8..19930b5e4caea929d640f205be85f2c116616df4 100644 (file)
@@ -1154,7 +1154,7 @@ class DBStructure
                                                ]
                                ];
                $database["item"] = [
-                               "comment" => "All posts",
+                               "comment" => "Structure for all posts",
                                "fields" => [
                                                "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
                                                "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this item"],
@@ -1251,6 +1251,32 @@ class DBStructure
                                                "uid_ownerlink" => ["uid","owner-link(190)"],
                                                ]
                                ];
+               $database["item-content"] = [
+                               "comment" => "Content for all posts",
+                               "fields" => [
+                                               "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
+                                               "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "uri-plink-hash" => ["type" => "char(80)", "not null" => "1", "default" => "", "comment" => "SHA-1 hash from uri and plink"],
+                                               "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
+                                               "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "body" => ["type" => "mediumtext", "comment" => "item body content"],
+                                               "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
+                                               "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
+                                               "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
+                                               "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
+                                               "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
+                                               "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
+                                               "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
+                                               "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
+                                               "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uri-plink-hash" => ["UNIQUE", "uri-plink-hash"],
+                                               "uri" => ["uri(191)"],
+                                               ]
+                               ];
                $database["locks"] = [
                                "comment" => "",
                                "fields" => [