X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=static%2Fdbstructure.config.php;h=961321e0fa98b65fb2cbccdb762b66d47f631769;hb=6dc2988c0fd0bd755824347d82541e2c55f1c7ac;hp=8013b928f11a89fc7c396b0a1fac4115ad62c46e;hpb=b2982f102f2e3d589e911698f236701044a0e745;p=friendica.git diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 8013b928f1..961321e0fa 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -1,6 +1,6 @@ ["id"], "nurl" => ["UNIQUE", "nurl(190)"], "next_contact" => ["next_contact"], + "network" => ["network"], ] ], "user" => [ @@ -147,6 +148,8 @@ return [ "PRIMARY" => ["uid"], "nickname" => ["nickname(32)"], "parent-uid" => ["parent-uid"], + "guid" => ["guid"], + "email" => ["email(64)"], ] ], "contact" => [ @@ -242,6 +245,7 @@ return [ "blocked_uid" => ["blocked", "uid"], "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"], "uid_network_batch" => ["uid", "network", "batch(64)"], + "batch_contact-type" => ["batch(64)", "contact-type"], "addr_uid" => ["addr(128)", "uid"], "nurl_uid" => ["nurl(128)", "uid"], "nick_uid" => ["nick(128)", "uid"], @@ -251,6 +255,10 @@ return [ "network_uid_lastupdate" => ["network", "uid", "last-update"], "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"], "uid_lastitem" => ["uid", "last-item"], + "baseurl" => ["baseurl(64)"], + "uid_contact-type" => ["uid", "contact-type"], + "uid_self_contact-type" => ["uid", "self", "contact-type"], + "self_network_uid" => ["self", "network", "uid"], "gsid" => ["gsid"] ] ], @@ -317,7 +325,8 @@ return [ "name" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""] ], "indexes" => [ - "PRIMARY" => ["id"] + "PRIMARY" => ["id"], + "name" => ["name"] ] ], // Main tables @@ -375,6 +384,7 @@ return [ ], "indexes" => [ "PRIMARY" => ["id"], + "installed_name" => ["installed", "name"], "name" => ["UNIQUE", "name"], ] ], @@ -416,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" => [ @@ -480,6 +529,7 @@ return [ ], "indexes" => [ "PRIMARY" => ["id"], + "expire" => ["expire"], ] ], "config" => [ @@ -693,6 +743,7 @@ return [ ], "indexes" => [ "PRIMARY" => ["id"], + "priority" => ["priority"], "hook_file_function" => ["UNIQUE", "hook", "file", "function"], ] ], @@ -767,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" => ""], @@ -775,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" => [ @@ -785,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" => [ @@ -822,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" => [ @@ -985,8 +1068,8 @@ return [ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"], "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the owner of this item"], "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of this item"], - "causer-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], - "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"], + "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], + "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"], "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"], "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"], "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], @@ -1002,7 +1085,6 @@ return [ "author-id" => ["author-id"], "causer-id" => ["causer-id"], "vid" => ["vid"], - "received" => ["received"], ] ], "post-category" => [ @@ -1043,6 +1125,7 @@ return [ "indexes" => [ "PRIMARY" => ["uri-id"], "plink" => ["plink(191)"], + "resource-id" => ["resource-id"], "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"], ] ], @@ -1080,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"], @@ -1106,7 +1196,7 @@ return [ "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"], "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"], "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"], - "causer-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], + "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], "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" => ""], @@ -1120,7 +1210,6 @@ return [ "causer-id" => ["causer-id"], "received" => ["received"], "commented" => ["commented"], - "changed" => ["changed"] ] ], "post-user" => [ @@ -1138,8 +1227,9 @@ return [ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"], "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the owner of this item"], "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of this item"], - "causer-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], - "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"], + "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], + "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"], + "post-reason" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Reason why the post arrived at the user"], "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"], "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"], "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], @@ -1160,26 +1250,23 @@ return [ "PRIMARY" => ["id"], "uid_uri-id" => ["UNIQUE", "uid", "uri-id"], "uri-id" => ["uri-id"], - "contact-id" => ["contact-id"], - "psid" => ["psid"], - "uid_hidden" => ["uid", "hidden"], - "event-id" => ["event-id"], - "uid_wall" => ["uid", "wall"], - "parent-uri-id_uid" => ["parent-uri-id", "uid"], + "parent-uri-id" => ["parent-uri-id"], "thr-parent-id" => ["thr-parent-id"], "external-id" => ["external-id"], "owner-id" => ["owner-id"], - "author-id_uid" => ["author-id", "uid"], + "author-id" => ["author-id"], "causer-id" => ["causer-id"], "vid" => ["vid"], - "uid_received" => ["uid", "received"], + "contact-id" => ["contact-id"], + "event-id" => ["event-id"], + "psid" => ["psid"], + "author-id_uid" => ["author-id", "uid"], + "author-id_received" => ["author-id", "received"], + "parent-uri-id_uid" => ["parent-uri-id", "uid"], + "uid_contactid" => ["uid", "contact-id"], "uid_unseen_contactid" => ["uid", "unseen", "contact-id"], - "uid_network_received" => ["uid", "network", "received"], - "uid_contactid_received" => ["uid", "contact-id", "received"], - "authorid_received" => ["author-id", "received"], - "uid_unseen_wall" => ["uid", "unseen", "wall"], - "uid_eventid" => ["uid", "event-id"], - "psid_wall" => ["psid", "wall"], + "uid_unseen" => ["uid", "unseen"], + "uid_hidden_uri-id" => ["uid", "hidden", "uri-id"], ], ], "post-thread-user" => [ @@ -1188,7 +1275,7 @@ return [ "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"], "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"], "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"], - "causer-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], + "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"], "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" => ""], @@ -1211,30 +1298,20 @@ return [ ], "indexes" => [ "PRIMARY" => ["uid", "uri-id"], - "uid_wall" => ["uid", "wall"], - "uid_pinned" => ["uid", "pinned"], "uri-id" => ["uri-id"], + "owner-id" => ["owner-id"], + "author-id" => ["author-id"], + "causer-id" => ["causer-id"], + "uid" => ["uid"], "contact-id" => ["contact-id"], "psid" => ["psid"], "post-user-id" => ["post-user-id"], - "owner-id" => ["owner-id"], - "causer-id" => ["causer-id"], + "commented" => ["commented"], "uid_received" => ["uid", "received"], + "uid_pinned" => ["uid", "pinned"], "uid_commented" => ["uid", "commented"], - "uid_changed" => ["uid", "changed"], - "uid_contact-id" => ["uid", "contact-id", "received"], - "uid_unseen_contactid" => ["uid", "unseen", "contact-id"], - "uid_network_received" => ["uid", "network", "received"], - "uid_network_commented" => ["uid", "network", "commented"], - "uid_contact-id_received" => ["uid", "contact-id", "received"], - "author-id_received" => ["author-id", "received"], - "uid_wall_changed" => ["uid", "wall", "changed"], - "uid_unseen_wall" => ["uid", "unseen", "wall"], - "mention_uid" => ["mention", "uid"], - "psid_wall" => ["psid", "wall"], - "received" => ["received"], - "commented" => ["commented"], - "changed" => ["changed"], + "uid_starred" => ["uid", "starred"], + "uid_mention" => ["uid", "mention"], ] ], "post-user-notification" => [ @@ -1393,7 +1470,8 @@ return [ ], "indexes" => [ "PRIMARY" => ["id"], - "uid" => ["uid"], + "uid_term" => ["uid", "term(64)"], + "term" => ["term(64)"] ] ], "session" => [