X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=static%2Fdbstructure.config.php;h=bf85bb56c793c62020fbe5f13585efad0d60df1e;hb=087ad25c87a4276f6082c0d710dae603aab4909c;hp=8963b1df604e5215f64daa56e9eee3658f948ec2;hpb=7ce97459d437a98ece0077b28bb36771aa36ed82;p=friendica.git diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 8963b1df60..bf85bb56c7 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -55,7 +55,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1452); + define('DB_UPDATE_VERSION', 1464); } 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"], @@ -394,6 +395,8 @@ return [ "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""], "outbox" => ["type" => "varchar(255)", "comment" => ""], "sharedinbox" => ["type" => "varchar(255)", "comment" => ""], + "featured" => ["type" => "varchar(255)", "comment" => "Address for the collection of featured posts"], + "featured-tags" => ["type" => "varchar(255)", "comment" => "Address for the collection of featured tags"], "manually-approve" => ["type" => "boolean", "comment" => ""], "discoverable" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is published in their directory"], "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], @@ -615,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" => [ @@ -757,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"], @@ -765,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" => [ @@ -1097,8 +1114,19 @@ return [ ], "indexes" => [ "PRIMARY" => ["uri-id", "uid", "type", "tid"], - "uri-id" => ["tid"], - "uid" => ["uid"], + "tid" => ["tid"], + "uid_uri-id" => ["uid", "uri-id"], + ] + ], + "post-collection" => [ + "comment" => "Collection of posts", + "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"], + "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "0 - Featured"], + ], + "indexes" => [ + "PRIMARY" => ["uri-id", "type"], + "type" => ["type"], ] ], "post-content" => [ @@ -1129,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" => [ @@ -1148,6 +1193,32 @@ return [ "PRIMARY" => ["uri-id"], ] ], + "post-history" => [ + "comment" => "Post history", + "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"], + "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "primary" => "1", "comment" => "Date of edit"], + "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"], + "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"], + "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"], + "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"] + ], + "indexes" => [ + "PRIMARY" => ["uri-id", "edited"], + ] + ], "post-link" => [ "comment" => "Post related external links", "fields" => [ @@ -1187,6 +1258,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" => [ @@ -1295,7 +1393,7 @@ return [ "changed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date that something in the conversation changed, indicating clients should fetch the conversation again"], "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"], - "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The thread is pinned on the profile page"], + "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"], "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"], "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"], @@ -1322,7 +1420,6 @@ return [ "commented" => ["commented"], "uid_received" => ["uid", "received"], "uid_wall_received" => ["uid", "wall", "received"], - "uid_pinned" => ["uid", "pinned"], "uid_commented" => ["uid", "commented"], "uid_starred" => ["uid", "starred"], "uid_mention" => ["uid", "mention"], @@ -1542,6 +1639,7 @@ return [ "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"], "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"], "hidden" => ["type" => "boolean", "comment" => "This contact is hidden from the others"], + "is-blocked" => ["type" => "boolean", "comment" => "User is blocked by this contact"], "pending" => ["type" => "boolean", "comment" => ""], "rel" => ["type" => "tinyint unsigned", "comment" => "The kind of the relation between the user and the contact"], "info" => ["type" => "mediumtext", "comment" => ""],