X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=static%2Fdbstructure.config.php;h=d0c35e4f8d491ac3e6c055e8ee32cf720202907b;hb=04caf1777298b9baaf92722b5b1698d342831400;hp=23c35358e2f9413058b6e227029609fb2cba6f7b;hpb=dc842f4f37a5ff9cb787cac23272c38faf2ff892;p=friendica.git diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 23c35358e2..d0c35e4f8d 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', 1393); + define('DB_UPDATE_VERSION', 1396); } return [ @@ -348,6 +348,20 @@ return [ "PRIMARY" => ["uid", "code"] ] ], + "2fa_trusted_browser" => [ + "comment" => "Two-factor authentication trusted browsers", + "fields" => [ + "cookie_hash" => ["type" => "varchar(80)", "not null" => "1", "primary" => "1", "comment" => "Trusted cookie hash"], + "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"], + "user_agent" => ["type" => "text", "comment" => "User agent string"], + "created" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the trusted browser was recorded"], + "last_used" => ["type" => "datetime", "comment" => "Datetime the trusted browser was last used"], + ], + "indexes" => [ + "PRIMARY" => ["cookie_hash"], + "uid" => ["uid"], + ] + ], "addon" => [ "comment" => "registered addons", "fields" => [ @@ -844,55 +858,6 @@ return [ "causer-id" => ["causer-id"], ] ], - "item-activity" => [ - "comment" => "Activities for items", - "fields" => [ - "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"], - "uri" => ["type" => "varchar(255)", "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"], - "activity" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""] - ], - "indexes" => [ - "PRIMARY" => ["id"], - "uri-hash" => ["UNIQUE", "uri-hash"], - "uri" => ["uri(191)"], - "uri-id" => ["uri-id"] - ] - ], - "item-content" => [ - "comment" => "Content for all posts", - "fields" => [ - "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"], - "uri" => ["type" => "varchar(255)", "comment" => ""], - "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"], - "uri-plink-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"], - "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"], - "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"], - "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams verb"] - ], - "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"] - ] - ], "locks" => [ "comment" => "", "fields" => [ @@ -1147,6 +1112,33 @@ return [ "uid" => ["uid"], ] ], + "post-content" => [ + "comment" => "Content for all 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"], + "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"], + "plink" => ["plink(191)"], + "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"], + ] + ], "post-delivery-data" => [ "comment" => "Delivery data for items", "fields" => [ @@ -1204,8 +1196,9 @@ return [ "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"], + "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"], + "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"], + "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"], "protocol" => ["type" => "tinyint unsigned", "comment" => "Protocol used to deliver the item for this user"], "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"], @@ -1215,7 +1208,8 @@ return [ "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"], ], "indexes" => [ - "PRIMARY" => ["uid", "uri-id"], + "PRIMARY" => ["id"], + "uid_uri-id" => ["UNIQUE", "uid", "uri-id"], "uri-id" => ["uri-id"], "contact-id" => ["contact-id"], "psid" => ["psid"],