]> git.mxchange.org Git - friendica.git/blobdiff - static/dbstructure.config.php
New table "post-user" and more foreign keys
[friendica.git] / static / dbstructure.config.php
old mode 100755 (executable)
new mode 100644 (file)
index 65a1453..9548e95
@@ -54,7 +54,7 @@
 use Friendica\Database\DBA;
 
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1364);
+       define('DB_UPDATE_VERSION', 1376);
 }
 
 return [
@@ -93,7 +93,7 @@ return [
                "comment" => "contact table",
                "fields" => [
                        "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"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["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"],
@@ -153,6 +153,7 @@ return [
                        "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum"],
                        "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group"],
                        "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                       "manually-approve" => ["type" => "boolean", "comment" => ""],
                        "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
                        "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
                        "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
@@ -223,7 +224,7 @@ return [
                "comment" => "The local users",
                "fields" => [
                        "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
-                       "parent-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"],
+                       "parent-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"],
                                "comment" => "The parent user that has full control about this user"],
                        "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
                        "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
@@ -272,6 +273,7 @@ return [
                "indexes" => [
                        "PRIMARY" => ["uid"],
                        "nickname" => ["nickname(32)"],
+                       "parent-uid" => ["parent-uid"],
                ]
        ],
        "clients" => [
@@ -293,7 +295,7 @@ return [
                "comment" => "",
                "fields" => [
                        "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 id of this permission set"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
                        "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
                        "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
                        "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
@@ -301,7 +303,7 @@ return [
                ],
                "indexes" => [
                        "PRIMARY" => ["id"],
-                       "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
+                       "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["uid", "allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
                ]
        ],
        // Main tables
@@ -528,7 +530,7 @@ return [
                "fields" => [
                        "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
                        "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
-                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
                        "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
                        "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
@@ -652,6 +654,17 @@ return [
                        "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
                ]
        ],
+       "host" => [
+               "comment" => "Hostname",
+               "fields" => [
+                       "id" => ["type" => "tinyint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+                       "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "The hostname"],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["id"],
+                       "name" => ["UNIQUE", "name"],
+               ]
+       ],
        "inbox-status" => [
                "comment" => "Status of ActivityPub inboxes",
                "fields" => [
@@ -671,7 +684,7 @@ return [
                "comment" => "",
                "fields" => [
                        "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" => "User id"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
                        "fid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["fcontact" => "id"], "comment" => ""],
                        "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
                        "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
@@ -691,14 +704,14 @@ return [
        "item" => [
                "comment" => "Structure for all posts",
                "fields" => [
-                       "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
+                       "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
                        "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this item"],
                        "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
                        "uri-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
                        "parent" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => "item.id of the parent to this item if it is a reply of some form; otherwise this must be set to the id of this item"],
-                       "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "uri of the parent to this item"],
-                       "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
+                       "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "uri of the top-level parent to this item"],
+                       "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the top-level parent uri"],
                        "thr-parent" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "If the parent of this item is not the top-level item in the conversation, the uri of the immediate parent; otherwise set to parent-uri"],
                        "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
                        "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
@@ -710,6 +723,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"],
@@ -721,7 +735,7 @@ return [
                        "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
                        "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been deleted"],
                        // User specific fields. Eventually they will move to user-item
-                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
                        "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
                        "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
                        "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
@@ -734,9 +748,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"],
@@ -801,6 +814,7 @@ return [
                        "uri-id" => ["uri-id"],
                        "parent-uri-id" => ["parent-uri-id"],
                        "thr-parent-id" => ["thr-parent-id"],
+                       "causer-id" => ["causer-id"],
                ]
        ],
        "item-activity" => [
@@ -829,6 +843,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"],
@@ -845,6 +860,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"]
@@ -962,7 +978,7 @@ return [
                "comment" => "",
                "fields" => [
                        "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
-                       "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["notify" => "id"], "comment" => ""],
+                       "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["notify" => "id"], "comment" => ""],
                        "master-parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
                        "master-parent-uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
                        "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
@@ -973,6 +989,7 @@ return [
                        "PRIMARY" => ["id"],
                        "master-parent-uri-id" => ["master-parent-uri-id"],
                        "receiver-uid" => ["receiver-uid"],
+                       "notify-id" => ["notify-id"],
                ]
        ],
        "oembed" => [
@@ -992,7 +1009,7 @@ return [
                "comment" => "Store OpenWebAuth token to verify contacts",
                "fields" => [
                        "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
-                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id - currently unused"],
                        "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
                        "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
                        "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
@@ -1034,11 +1051,11 @@ return [
        "pconfig" => [
                "comment" => "personal (per user) configuration storage",
                "fields" => [
-                       "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                       "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Primary key"],
                        "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
-                       "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
-                       "k" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => ""],
-                       "v" => ["type" => "mediumtext", "comment" => ""],
+                       "cat" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "Category"],
+                       "k" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "Key"],
+                       "v" => ["type" => "mediumtext", "comment" => "Value"],
                ],
                "indexes" => [
                        "PRIMARY" => ["id"],
@@ -1049,7 +1066,7 @@ return [
                "comment" => "photo storage",
                "fields" => [
                        "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"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
                        "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "contact.id"],
                        "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
                        "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
@@ -1089,13 +1106,14 @@ return [
                "comment" => "post relation to categories",
                "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"],
-                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User id"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
                        "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
                        "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
                ],
                "indexes" => [
                        "PRIMARY" => ["uri-id", "uid", "type", "tid"],
-                       "uri-id" => ["tid"]
+                       "uri-id" => ["tid"],
+                       "uid" => ["uid"],
                ]
        ],
        "post-delivery-data" => [
@@ -1117,6 +1135,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" => [
@@ -1131,6 +1170,25 @@ return [
                        "cid" => ["cid"]
                ]
        ],
+       "post-user" => [
+               "comment" => "User specific post data",
+               "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"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
+                       "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
+                       "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
+                       "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
+                       "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+                       "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
+                       "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["uid", "uri-id"],
+                       "uri-id" => ["uri-id"],
+                       "contact-id" => ["contact-id"],
+                       "psid" => ["psid"],
+               ],
+       ],
        "process" => [
                "comment" => "Currently running system processes",
                "fields" => [
@@ -1305,10 +1363,10 @@ return [
        "thread" => [
                "comment" => "Thread related data",
                "fields" => [
-                       "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["item" => "id"],
+                       "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["item" => "id"],
                                "comment" => "sequential ID"],
                        "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
-                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
                        "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
                        "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Item owner"],
                        "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Item author"],
@@ -1444,7 +1502,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"],