]> git.mxchange.org Git - friendica.git/blobdiff - static/dbstructure.config.php
Blanks replaced
[friendica.git] / static / dbstructure.config.php
index aea48375668a3ba449eca4b05450c9d139a8af5f..44b2fc1f80fa5dff06e35e0799aab91dd25fe983 100644 (file)
@@ -55,7 +55,7 @@
 use Friendica\Database\DBA;
 
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1457);
+       define('DB_UPDATE_VERSION', 1462);
 }
 
 return [
@@ -289,7 +289,8 @@ return [
                "fields" => [
                        "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
                        "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
-                       "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""]
+                       "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+                       "type" => ["type" => "tinyint unsigned", "comment" => "Type of the tag (Unknown, General Collection, Follower Collection or Account)"],
                ],
                "indexes" => [
                        "PRIMARY" => ["id"],
@@ -617,6 +618,18 @@ return [
                        "PRIMARY" => ["uri-id"]
                ]
        ],
+       "endpoint" => [
+               "comment" => "ActivityPub endpoints - used in the ActivityPub implementation",
+               "fields" => [
+                       "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
+                       "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
+                       "owner-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["url"],
+                       "owner-uri-id_type" => ["UNIQUE", "owner-uri-id", "type"],
+               ]
+       ],
        "event" => [
                "comment" => "Events",
                "fields" => [
@@ -759,6 +772,7 @@ return [
                "comment" => "Status of ActivityPub inboxes",
                "fields" => [
                        "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
+                       "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
                        "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
                        "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
                        "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
@@ -767,7 +781,8 @@ return [
                        "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
                ],
                "indexes" => [
-                       "PRIMARY" => ["url"]
+                       "PRIMARY" => ["url"],
+                       "uri-id" => ["uri-id"],
                ]
        ],
        "intro" => [
@@ -1099,8 +1114,8 @@ return [
                ],
                "indexes" => [
                        "PRIMARY" => ["uri-id", "uid", "type", "tid"],
-                       "uri-id" => ["tid"],
-                       "uid" => ["uid"],
+                       "tid" => ["tid"],
+                       "uid_uri-id" => ["uid", "uri-id"],
                ]
        ],
        "post-collection" => [
@@ -1142,6 +1157,23 @@ return [
                        "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
                ]
        ],
+       "post-delivery" => [
+               "comment" => "Delivery data for posts for the batch processing",
+               "fields" => [
+                       "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
+                       "inbox-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
+                       "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
+                       "created" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+                       "command" => ["type" => "varbinary(32)", "comment" => ""],
+                       "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
+                       "receivers" => ["type" => "mediumtext", "comment" => "JSON encoded array with the receiving contacts"],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["uri-id", "inbox-id"],
+                       "inbox-id_created" => ["inbox-id", "created"],
+                       "uid" => ["uid"],
+               ]
+       ],
        "post-delivery-data" => [
                "comment" => "Delivery data for items",
                "fields" => [
@@ -1200,6 +1232,33 @@ return [
                "indexes" => [
                        "PRIMARY" => ["id"],
                        "uri-id-url" => ["UNIQUE", "uri-id", "url"],
+                       "uri-id-id" => ["uri-id", "id"],
+               ]
+       ],
+       "post-question" => [
+               "comment" => "Question",
+               "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"],
+                       "multiple" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Multiple choice"],
+                       "voters" => ["type" => "int unsigned", "comment" => "Number of voters for this question"],
+                       "end-time" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Question end time"],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["id"],
+                       "uri-id" => ["UNIQUE", "uri-id"],
+               ]
+       ],
+       "post-question-option" => [
+               "comment" => "Question option",
+               "fields" => [
+                       "id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "Id of the question"],
+                       "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
+                       "name" => ["type" => "varchar(255)", "comment" => "Name of the option"],
+                       "replies" => ["type" => "int unsigned", "comment" => "Number of replies for this question option"],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["uri-id", "id"],
                ]
        ],
        "post-tag" => [