X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=static%2Fdbstructure.config.php;h=961321e0fa98b65fb2cbccdb762b66d47f631769;hb=6dc2988c0fd0bd755824347d82541e2c55f1c7ac;hp=8ec833ca64100c75fb41c188534360e8fd435f77;hpb=acda145ceee17ea9bfc21b5733313547535fd10e;p=friendica.git diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 8ec833ca64..961321e0fa 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', 1413); + define('DB_UPDATE_VERSION', 1421); } return [ @@ -426,6 +426,45 @@ return [ "gsid" => ["gsid"] ] ], + "application" => [ + "comment" => "OAuth application", + "fields" => [ + "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"], + "client_id" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""], + "client_secret" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""], + "name" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""], + "redirect_uri" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""], + "website" => ["type" => "varchar(255)", "comment" => ""], + "scopes" => ["type" => "varchar(255)", "comment" => ""], + "read" => ["type" => "boolean", "comment" => "Read scope"], + "write" => ["type" => "boolean", "comment" => "Write scope"], + "follow" => ["type" => "boolean", "comment" => "Follow scope"], + "push" => ["type" => "boolean", "comment" => "Push scope"], + ], + "indexes" => [ + "PRIMARY" => ["id"], + "client_id" => ["UNIQUE", "client_id"] + ] + ], + "application-token" => [ + "comment" => "OAuth user token", + "fields" => [ + "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""], + "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"], + "code" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""], + "access_token" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""], + "created_at" => ["type" => "datetime", "not null" => "1", "comment" => "creation time"], + "scopes" => ["type" => "varchar(255)", "comment" => ""], + "read" => ["type" => "boolean", "comment" => "Read scope"], + "write" => ["type" => "boolean", "comment" => "Write scope"], + "follow" => ["type" => "boolean", "comment" => "Follow scope"], + "push" => ["type" => "boolean", "comment" => "Push scope"], + ], + "indexes" => [ + "PRIMARY" => ["application-id", "uid"], + "uid_id" => ["uid", "application-id"], + ] + ], "attach" => [ "comment" => "file attachments", "fields" => [ @@ -779,6 +818,7 @@ return [ "from-photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"], "from-url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"], "contact-id" => ["type" => "varchar(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"], + "author-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of the mail"], "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"], "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "body" => ["type" => "mediumtext", "comment" => ""], @@ -787,7 +827,11 @@ return [ "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"], "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related mail"], "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related mail"], + "thr-parent" => ["type" => "varchar(255)", "comment" => ""], + "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 time of the private message"], ], "indexes" => [ @@ -797,6 +841,10 @@ return [ "uri" => ["uri(64)"], "parent-uri" => ["parent-uri(64)"], "contactid" => ["contact-id(32)"], + "author-id" => ["author-id"], + "uri-id" => ["uri-id"], + "parent-uri-id" => ["parent-uri-id"], + "thr-parent-id" => ["thr-parent-id"], ] ], "mailacct" => [ @@ -834,6 +882,29 @@ return [ "mid" => ["mid"], ] ], + "notification" => [ + "comment" => "notifications", + "fields" => [ + "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], + "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"], + "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"], + "type" => ["type" => "tinyint unsigned", "comment" => ""], + "actor-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the actor that caused the notification"], + "target-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"], + "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"], + "created" => ["type" => "datetime", "comment" => ""], + "seen" => ["type" => "boolean", "default" => "0", "comment" => ""], + ], + "indexes" => [ + "PRIMARY" => ["id"], + "uid_vid_type_actor-id_target-uri-id" => ["UNIQUE", "uid", "vid", "type", "actor-id", "target-uri-id"], + "vid" => ["vid"], + "actor-id" => ["actor-id"], + "target-uri-id" => ["target-uri-id"], + "parent-uri-id" => ["parent-uri-id"], + "seen_uid" => ["seen", "uid"], + ] + ], "notify" => [ "comment" => "notifications", "fields" => [ @@ -1092,6 +1163,13 @@ return [ "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" => ""], + "name" => ["type" => "varchar(255)", "comment" => "Name of the media"], + "author-url" => ["type" => "varbinary(255)", "comment" => "URL of the author of the media"], + "author-name" => ["type" => "varchar(255)", "comment" => "Name of the author of the media"], + "author-image" => ["type" => "varbinary(255)", "comment" => "Image of the author of the media"], + "publisher-url" => ["type" => "varbinary(255)", "comment" => "URL of the publisher of the media"], + "publisher-name" => ["type" => "varchar(255)", "comment" => "Name of the publisher of the media"], + "publisher-image" => ["type" => "varbinary(255)", "comment" => "Image of the publisher of the media"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -1122,7 +1200,7 @@ return [ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""], "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], - "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"], + "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" => ""] ], "indexes" => [