X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=static%2Fdbstructure.config.php;h=9fccdf14b633327fe7632ef0f3dbdce65df97f08;hb=6abe7692e5746cec04a2802024ffaf82064e4da0;hp=512002f25cb5578f2de8075944d3499df0d1d646;hpb=aadaf032ee0be5915714f6e3d23a06ceaa126da0;p=friendica.git diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 512002f25c..9fccdf14b6 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -54,11 +54,40 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1349); + define('DB_UPDATE_VERSION', 1351); } return [ // Side tables + "gserver" => [ + "comment" => "Global servers", + "fields" => [ + "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], + "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "info" => ["type" => "text", "comment" => ""], + "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""], + "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"], + "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"], + "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""], + "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"], + "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"], + "detection-method" => ["type" => "tinyint unsigned", "comment" => "Method that had been used to detect that server"], + "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], + "last_poco_query" => ["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" => ""], + ], + "indexes" => [ + "PRIMARY" => ["id"], + "nurl" => ["UNIQUE", "nurl(190)"], + ] + ], "clients" => [ "comment" => "OAuth usage", "fields" => [ @@ -142,6 +171,7 @@ return [ "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"], "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"], "baseurl" => ["type" => "varchar(255)", "default" => "", "comment" => "baseurl of the contact"], + "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"], "reason" => ["type" => "text", "comment" => ""], "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""], "info" => ["type" => "mediumtext", "comment" => ""], @@ -166,6 +196,7 @@ return [ "nick_uid" => ["nick(32)", "uid"], "dfrn-id" => ["dfrn-id(64)"], "issued-id" => ["issued-id(64)"], + "gsid" => ["gsid"] ] ], "item-uri" => [ @@ -273,6 +304,7 @@ return [ "alias" => ["type" => "varchar(255)", "comment" => ""], "pubkey" => ["type" => "text", "comment" => ""], "baseurl" => ["type" => "varchar(255)", "comment" => "baseurl of the ap contact"], + "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"], "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"], "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"], "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"], @@ -283,7 +315,8 @@ return [ "PRIMARY" => ["url"], "addr" => ["addr(32)"], "alias" => ["alias(190)"], - "url" => ["followers(190)"] + "followers" => ["followers(190)"], + "gsid" => ["gsid"] ] ], "attach" => [ @@ -539,6 +572,7 @@ return [ "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "generation" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""], "server_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "baseurl of the contacts server"], + "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -548,6 +582,7 @@ return [ "addr" => ["addr(64)"], "hide_network_updated" => ["hide", "network", "updated"], "updated" => ["updated"], + "gsid" => ["gsid"] ] ], "gfollower" => [ @@ -605,34 +640,6 @@ return [ "gid_contactid" => ["UNIQUE", "gid", "contact-id"], ] ], - "gserver" => [ - "comment" => "Global servers", - "fields" => [ - "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], - "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "info" => ["type" => "text", "comment" => ""], - "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""], - "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"], - "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"], - "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""], - "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"], - "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"], - "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], - "last_poco_query" => ["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" => ""], - ], - "indexes" => [ - "PRIMARY" => ["id"], - "nurl" => ["UNIQUE", "nurl(190)"], - ] - ], "gserver-tag" => [ "comment" => "Tags that the server has subscribed", "fields" => [ @@ -1336,6 +1343,7 @@ return [ "fields" => [ "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["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"], "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"], @@ -1374,6 +1382,7 @@ return [ "uid_commented" => ["uid", "commented"], "uid_wall_received" => ["uid", "wall", "received"], "private_wall_origin_commented" => ["private", "wall", "origin", "commented"], + "uri-id" => ["uri-id"], ] ], "tokens" => [