]> git.mxchange.org Git - friendica.git/blobdiff - static/dbstructure.config.php
Merge pull request #9500 from MrPetovan/bug/9326-owner-view-blocked
[friendica.git] / static / dbstructure.config.php
index 23a299e65208cdf053765ea062b3844b798e9bbd..67b302054a3fafe457824e9728a6ae89ec6e3a48 100755 (executable)
@@ -54,7 +54,7 @@
 use Friendica\Database\DBA;
 
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1367);
+       define('DB_UPDATE_VERSION', 1373);
 }
 
 return [
@@ -722,6 +722,7 @@ return [
                        "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
                        "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the owner of this item"],
                        "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the author of this item"],
+                       "causer-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"],
                        "icid" => ["type" => "int unsigned", "relation" => ["item-content" => "id"], "comment" => "Id of the item-content table entry that contains the whole item content"],
                        "iaid" => ["type" => "int unsigned", "relation" => ["item-activity" => "id"], "comment" => "Id of the item-activity table entry that contains the activity data"],
                        "vid" => ["type" => "smallint unsigned", "relation" => ["verb" => "id"], "comment" => "Id of the verb table entry that contains the activity verbs"],
@@ -746,9 +747,8 @@ return [
                        // It has to be decided whether these fields belong to the user or the structure
                        "resource-id" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type"],
                        "event-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["event" => "id"], "comment" => "Used to link to the event.id"],
-                       // Could possibly be replaced by the "attach" table?
-                       "attach" => ["type" => "mediumtext", "comment" => "JSON structure representing attachments to this item"],
                        // Deprecated fields. Will be removed in upcoming versions
+                       "attach" => ["type" => "mediumtext", "comment" => "Deprecated"],
                        "allow_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
                        "allow_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
                        "deny_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
@@ -813,6 +813,7 @@ return [
                        "uri-id" => ["uri-id"],
                        "parent-uri-id" => ["parent-uri-id"],
                        "thr-parent-id" => ["thr-parent-id"],
+                       "causer-id" => ["causer-id"],
                ]
        ],
        "item-activity" => [
@@ -841,6 +842,7 @@ return [
                        "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"],
+                       "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
                        "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"],
                        "language" => ["type" => "text", "comment" => "Language information about this post"],
@@ -857,6 +859,7 @@ return [
                "indexes" => [
                        "PRIMARY" => ["id"],
                        "uri-plink-hash" => ["UNIQUE", "uri-plink-hash"],
+                       "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
                        "uri" => ["uri(191)"],
                        "plink" => ["plink(191)"],
                        "uri-id" => ["uri-id"]
@@ -1130,6 +1133,27 @@ return [
                        "PRIMARY" => ["uri-id"],
                ]
        ],
+       "post-media" => [
+               "comment" => "Attached media",
+               "fields" => [
+                       "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+                       "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
+                       "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "Media URL"],
+                       "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
+                       "mimetype" => ["type" => "varchar(60)", "comment" => ""],
+                       "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
+                       "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
+                       "size" => ["type" => "int unsigned", "comment" => "Media size"],
+                       "preview" => ["type" => "varbinary(255)", "comment" => "Preview URL"],
+                       "preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
+                       "preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
+                       "description" => ["type" => "text", "comment" => ""],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["id"],
+                       "uri-id-url" => ["UNIQUE", "uri-id", "url"],
+               ]
+       ],
        "post-tag" => [
                "comment" => "post relation to tags",
                "fields" => [
@@ -1457,7 +1481,7 @@ return [
                        "PRIMARY" => ["id"],
                        "done_parameter" => ["done", "parameter(64)"],
                        "done_executed" => ["done", "executed"],
-                       "done_priority_created" => ["done", "priority", "created"],
+                       "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
                        "done_priority_next_try" => ["done", "priority", "next_try"],
                        "done_pid_next_try" => ["done", "pid", "next_try"],
                        "done_pid_retrial" => ["done", "pid", "retrial"],