]> git.mxchange.org Git - friendica.git/blobdiff - config/dbstructure.config.php
Merge pull request #7089 from nupplaphil/task/mod_help
[friendica.git] / config / dbstructure.config.php
old mode 100644 (file)
new mode 100755 (executable)
index 99e3de9..3996205
@@ -34,7 +34,7 @@
 use Friendica\Database\DBA;
 
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1290);
+       define('DB_UPDATE_VERSION', 1310);
 }
 
 return [
@@ -65,6 +65,7 @@ return [
                        "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
                        "outbox" => ["type" => "varchar(255)", "comment" => ""],
                        "sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
+                       "manually-approve" => ["type" => "boolean", "comment" => ""],
                        "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "name" => ["type" => "varchar(255)", "comment" => ""],
                        "about" => ["type" => "text", "comment" => ""],
@@ -98,6 +99,8 @@ return [
                        "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
                        "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
                        "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
+                       "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
+                       "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
                ],
                "indexes" => [
                        "PRIMARY" => ["id"],
@@ -177,6 +180,7 @@ return [
                        "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
                        "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
                        "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+                       "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"],
                        "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
                        "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
                        "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
@@ -184,7 +188,7 @@ return [
                        "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network protocol of the contact"],
                        "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
                        "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
-                       "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                       "location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
                        "about" => ["type" => "text", "comment" => ""],
                        "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
                        "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
@@ -526,6 +530,21 @@ return [
                        "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
                ]
        ],
+       "inbox-status" => [
+               "comment" => "Status of ActivityPub inboxes",
+               "fields" => [
+                       "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
+                       "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"],
+                       "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
+                       "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
+                       "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["url"]
+               ]
+       ],
        "intro" => [
                "comment" => "",
                "fields" => [
@@ -643,6 +662,7 @@ return [
                        "uid_contactid_created" => ["uid", "contact-id", "created"],
                        "authorid_created" => ["author-id", "created"],
                        "ownerid" => ["owner-id"],
+                       "contact-id" => ["contact-id"],
                        "uid_uri" => ["uid", "uri(190)"],
                        "resource-id" => ["resource-id"],
                        "deleted_changed" => ["deleted", "changed"],
@@ -705,6 +725,8 @@ return [
                        "iid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "relation" => ["item" => "id"], "comment" => "Item id"],
                        "postopts" => ["type" => "text", "comment" => "External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery"],
                        "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
+                       "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
+                       "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
                ],
                "indexes" => [
                        "PRIMARY" => ["iid"],
@@ -894,7 +916,9 @@ return [
                        "fid" => ["type" => "int unsigned", "not null" => "1", "relation" => ["fcontact" => "id"], "comment" => ""],
                ],
                "indexes" => [
-                       "PRIMARY" => ["iid", "server"]
+                       "PRIMARY" => ["iid", "server"],
+                       "cid" => ["cid"],
+                       "fid" => ["fid"]
                ]
        ],
        "pconfig" => [
@@ -951,6 +975,9 @@ return [
                        "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
                        "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
                        "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
+                       "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
+                       "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
+                       "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
                ],
                "indexes" => [
                        "PRIMARY" => ["id"],
@@ -1056,6 +1083,7 @@ return [
                "indexes" => [
                        "PRIMARY" => ["id"],
                        "uid_is-default" => ["uid", "is-default"],
+                       "pub_keywords" => ["FULLTEXT", "pub_keywords"],
                ]
        ],
        "profile_check" => [
@@ -1091,26 +1119,6 @@ return [
                        "next_try" => ["next_try"],
                ]
        ],
-       "queue" => [
-               "comment" => "Queue for messages that couldn't be delivered",
-               "fields" => [
-                       "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
-                       "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Message receiver"],
-                       "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Receiver's network"],
-                       "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Unique GUID of the message"],
-                       "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date, when the message was created"],
-                       "last" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last trial"],
-                       "next" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
-                       "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
-                       "content" => ["type" => "mediumtext", "comment" => ""],
-                       "batch" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
-               ],
-               "indexes" => [
-                       "PRIMARY" => ["id"],
-                       "last" => ["last"],
-                       "next" => ["next"],
-               ]
-       ],
        "register" => [
                "comment" => "registrations requiring admin approval",
                "fields" => [
@@ -1183,6 +1191,7 @@ return [
                ],
                "indexes" => [
                        "PRIMARY" => ["tid"],
+                       "term_type" => ["term(64)", "type"],
                        "oid_otype_type_term" => ["oid", "otype", "type", "term(32)"],
                        "uid_otype_type_term_global_created" => ["uid", "otype", "type", "term(32)", "global", "created"],
                        "uid_otype_type_url" => ["uid", "otype", "type", "url(64)"],
@@ -1354,7 +1363,7 @@ return [
                "comment" => "Background tasks queue entries",
                "fields" => [
                        "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
-                       "parameter" => ["type" => "mediumblob", "comment" => "Task command"],
+                       "parameter" => ["type" => "mediumtext", "comment" => "Task command"],
                        "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
                        "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
                        "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
@@ -1365,13 +1374,23 @@ return [
                ],
                "indexes" => [
                        "PRIMARY" => ["id"],
-                       "pid" => ["pid"],
-                       "parameter" => ["parameter(64)"],
-                       "priority_created_next_try" => ["priority", "created", "next_try"],
-                       "done_priority_executed_next_try" => ["done", "priority", "executed", "next_try"],
-                       "done_executed_next_try" => ["done", "executed", "next_try"],
+                       "done_parameter" => ["done", "parameter(64)"],
+                       "done_executed" => ["done", "executed"],
+                       "done_priority_created" => ["done", "priority", "created"],
                        "done_priority_next_try" => ["done", "priority", "next_try"],
-                       "done_next_try" => ["done", "next_try"]
+                       "done_pid_next_try" => ["done", "pid", "next_try"],
+                       "done_pid_priority_created" => ["done", "pid", "priority", "created"]
+               ]
+       ],
+       "storage" => [
+               "comment" => "Data stored by Database storage backend",
+               "fields" => [
+                       "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
+                       "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["id"]
                ]
        ]
 ];
+