X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=static%2Fdbstructure.config.php;h=8cd01b4aeb3a71e056ea5bb2a681d6298c8d9ad4;hb=79eeb409695716fae8a501a02ef57ed855acb3a8;hp=6ad1d241783d81a11d5eb31e48f5125e697ad845;hpb=6857d24995b0844a0cec89588fe874399f631a71;p=friendica.git diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 6ad1d24178..8cd01b4aeb 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -1,6 +1,23 @@ . + * + * Main database structure configuration file. * * Here are described all the tables, fields and indexes Friendica needs to work. * @@ -34,7 +51,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1331); + define('DB_UPDATE_VERSION', 1336); } return [ @@ -223,7 +240,7 @@ return [ "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" => ""], + "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"], "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], @@ -277,7 +294,7 @@ return [ "reason" => ["type" => "text", "comment" => ""], "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""], "info" => ["type" => "mediumtext", "comment" => ""], - "profile-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""], + "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"], "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""], "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""], "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], @@ -325,6 +342,7 @@ return [ "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation URI"], "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation link"], "protocol" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "255", "comment" => "The protocol of the item"], + "direction" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "How the message arrived here: 1=push, 2=pull"], "source" => ["type" => "mediumtext", "comment" => "Original source"], "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Receiving date"], ], @@ -444,12 +462,13 @@ return [ "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""], "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""], "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""], + "last_discovery" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last contact discovery"], "archive_date" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""], "archived" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "about" => ["type" => "text", "comment" => ""], "keywords" => ["type" => "text", "comment" => "puplic keywords (interests)"], - "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""], + "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"], "birthday" => ["type" => "varchar(32)", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""], "community" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if contact is forum account"], "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "-1", "comment" => ""], @@ -472,6 +491,18 @@ return [ "updated" => ["updated"], ] ], + "gfollower" => [ + "comment" => "Followers of global contacts", + "fields" => [ + "gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["gcontact" => "id"], "comment" => "global contact"], + "follower-gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["gcontact" => "id"], "comment" => "global contact of the follower"], + "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates that the connection has been deleted"], + ], + "indexes" => [ + "PRIMARY" => ["gcid", "follower-gcid"], + "follower-gcid" => ["follower-gcid"], + ] + ], "glink" => [ "comment" => "'friends of friends' linkages derived from poco", "fields" => [ @@ -630,7 +661,7 @@ return [ "extid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"], "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], - "private" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "distribution is restricted"], + "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"], "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been deleted"], @@ -1084,40 +1115,40 @@ return [ "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"], - "profile-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name of the profile"], - "is-default" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Mark this profile as default profile"], + "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"], + "is-default" => ["type" => "boolean", "comment" => "Deprecated"], "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"], "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "pdesc" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Title or description"], + "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"], "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"], "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""], "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "hometown" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""], - "marital" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "with" => ["type" => "text", "comment" => ""], - "howlong" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], - "sexual" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "politic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "religion" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"], + "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"], + "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"], + "with" => ["type" => "text", "comment" => "Deprecated"], + "howlong" => ["type" => "datetime", "comment" => "Deprecated"], + "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"], + "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"], + "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"], "pub_keywords" => ["type" => "text", "comment" => ""], "prv_keywords" => ["type" => "text", "comment" => ""], - "likes" => ["type" => "text", "comment" => ""], - "dislikes" => ["type" => "text", "comment" => ""], - "about" => ["type" => "text", "comment" => ""], - "summary" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "music" => ["type" => "text", "comment" => ""], - "book" => ["type" => "text", "comment" => ""], - "tv" => ["type" => "text", "comment" => ""], - "film" => ["type" => "text", "comment" => ""], - "interest" => ["type" => "text", "comment" => ""], - "romance" => ["type" => "text", "comment" => ""], - "work" => ["type" => "text", "comment" => ""], - "education" => ["type" => "text", "comment" => ""], - "contact" => ["type" => "text", "comment" => ""], + "likes" => ["type" => "text", "comment" => "Deprecated"], + "dislikes" => ["type" => "text", "comment" => "Deprecated"], + "about" => ["type" => "text", "comment" => "Profile description"], + "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"], + "music" => ["type" => "text", "comment" => "Deprecated"], + "book" => ["type" => "text", "comment" => "Deprecated"], + "tv" => ["type" => "text", "comment" => "Deprecated"], + "film" => ["type" => "text", "comment" => "Deprecated"], + "interest" => ["type" => "text", "comment" => "Deprecated"], + "romance" => ["type" => "text", "comment" => "Deprecated"], + "work" => ["type" => "text", "comment" => "Deprecated"], + "education" => ["type" => "text", "comment" => "Deprecated"], + "contact" => ["type" => "text", "comment" => "Deprecated"], "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], @@ -1277,7 +1308,7 @@ return [ "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "changed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], - "private" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], + "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"], "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],