X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=static%2Fdbstructure.config.php;h=3fbce08d40cf2e9a3c2a7f9ae414002ccef0d351;hb=ce38e63399aa41b87836dea85f13e3c0491ef5e3;hp=b501ea4df57195aa796e35ae26af37b310c9f4fe;hpb=b170dd765d411eff599fb908c4b05982c9460220;p=friendica.git diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index b501ea4df5..c1f1cfcbc1 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -1,6 +1,6 @@ ["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"], + "active-week-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last week"], + "active-month-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last month"], + "active-halfyear-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last six month"], + "local-posts" => ["type" => "int unsigned", "comment" => "Number of local posts"], + "local-comments" => ["type" => "int unsigned", "comment" => "Number of local comments"], "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" => ""], @@ -98,8 +103,7 @@ return [ "comment" => "The local users", "fields" => [ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], - "parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], - "comment" => "The parent user that has full control about this user"], + "parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "The parent user that has full control about this user"], "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"], "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"], "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"], @@ -172,29 +176,16 @@ return [ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"], "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"], - "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"], - "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], - "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"], - "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"], "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network of the contact"], - "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"], "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"], "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"], "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" => "Deprecated"], "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"], "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"], - "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"], - "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (thumb size)"], - "micro" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (micro size)"], "header" => ["type" => "varchar(255)", "comment" => "Header picture"], - "site-pubkey" => ["type" => "text", "comment" => "Deprecated"], - "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Deprecated"], - "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Deprecated"], "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"], @@ -203,54 +194,70 @@ return [ "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"], "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"], "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "request" => ["type" => "varchar(255)", "comment" => ""], "notify" => ["type" => "varchar(255)", "comment" => ""], "poll" => ["type" => "varchar(255)", "comment" => ""], - "confirm" => ["type" => "varchar(255)", "comment" => ""], "subscribe" => ["type" => "varchar(255)", "comment" => ""], - "poco" => ["type" => "varchar(255)", "comment" => ""], - "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"], - "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"], - "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], - "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], - "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"], "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"], "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"], "failed" => ["type" => "boolean", "comment" => "Connection failed"], - "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], - "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], - "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"], "last-discovery" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last follower discovery"], - "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""], "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Node-wide block status"], "block_reason" => ["type" => "text", "comment" => "Node-wide block reason"], "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"], - "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], - "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum"], - "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group"], - "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""], - "manually-approve" => ["type" => "boolean", "comment" => ""], - "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], + "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Person, organisation, news, community, relay"], + "manually-approve" => ["type" => "boolean", "comment" => "Contact requests have to be approved manually"], "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], - "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""], - "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"], - "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""], "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"], + "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""], + // User depending fields "reason" => ["type" => "text", "comment" => ""], - "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""], + "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"], + "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], + "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"], + "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"], + "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], + "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Automatically detected feed poll frequency"], + "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Feed poll priority"], + "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], + "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Contact request is pending"], + "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"], "info" => ["type" => "mediumtext", "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" => ""], "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""], "ffi_keyword_denylist" => ["type" => "text", "comment" => ""], + // Deprecated, but still in use + "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"], + "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (thumb size)"], + "micro" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (micro size)"], + "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], + "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], + "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], + "request" => ["type" => "varchar(255)", "comment" => ""], + "confirm" => ["type" => "varchar(255)", "comment" => ""], + "poco" => ["type" => "varchar(255)", "comment" => ""], + "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], + "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = false instead"], + "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = true instead"], + "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""], + // Deprecated fields that aren't in use anymore + "site-pubkey" => ["type" => "text", "comment" => "Deprecated"], + "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"], + "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"], + "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Deprecated"], + "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Deprecated"], + "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"], + "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"], + "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"], + "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => "Deprecated"], + "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -282,7 +289,8 @@ return [ "fields" => [ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""], "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""], - "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""] + "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""], + "type" => ["type" => "tinyint unsigned", "comment" => "Type of the tag (Unknown, General Collection, Follower Collection or Account)"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -350,6 +358,7 @@ return [ "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"], + "trusted" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Whenever this browser should be trusted or not"], "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"], ], @@ -387,6 +396,8 @@ return [ "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""], "outbox" => ["type" => "varchar(255)", "comment" => ""], "sharedinbox" => ["type" => "varchar(255)", "comment" => ""], + "featured" => ["type" => "varchar(255)", "comment" => "Address for the collection of featured posts"], + "featured-tags" => ["type" => "varchar(255)", "comment" => "Address for the collection of featured tags"], "manually-approve" => ["type" => "boolean", "comment" => ""], "discoverable" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is published in their directory"], "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], @@ -439,6 +450,21 @@ return [ "client_id" => ["UNIQUE", "client_id"] ] ], + "application-marker" => [ + "comment" => "Timeline marker", + "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"], + "timeline" => ["type" => "varchar(64)", "not null" => "1", "primary" => "1", "comment" => "Marker (home, notifications)"], + "last_read_id" => ["type" => "varchar(255)", "comment" => "Marker id for the timeline"], + "version" => ["type" => "smallint unsigned", "comment" => "Version number"], + "updated_at" => ["type" => "datetime", "comment" => "creation time"], + ], + "indexes" => [ + "PRIMARY" => ["application-id", "uid", "timeline"], + "uid_id" => ["uid"], + ] + ], "application-token" => [ "comment" => "OAuth user token", "fields" => [ @@ -608,6 +634,18 @@ return [ "PRIMARY" => ["uri-id"] ] ], + "endpoint" => [ + "comment" => "ActivityPub endpoints - used in the ActivityPub implementation", + "fields" => [ + "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"], + "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""], + "owner-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"], + ], + "indexes" => [ + "PRIMARY" => ["url"], + "owner-uri-id_type" => ["UNIQUE", "owner-uri-id", "type"], + ] + ], "event" => [ "comment" => "Events", "fields" => [ @@ -626,7 +664,6 @@ return [ "location" => ["type" => "text", "comment" => "event location"], "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"], "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"], - "adjust" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "adjust to timezone of the recipient (0 or 1)"], "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"], "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"], "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"], @@ -661,6 +698,9 @@ return [ "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "pubkey" => ["type" => "text", "comment" => ""], "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], + "interacting_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts this contact interactes with"], + "interacted_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts that interacted with this contact"], + "post_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts and comments"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -695,11 +735,13 @@ return [ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"], "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"], "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"], + "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Contact id of forum. When this field is filled then the members are synced automatically."], "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"], ], "indexes" => [ "PRIMARY" => ["id"], "uid" => ["uid"], + "cid" => ["cid"], ] ], "group_member" => [ @@ -742,21 +784,42 @@ return [ "hook_file_function" => ["UNIQUE", "hook", "file", "function"], ] ], - "host" => [ - "comment" => "Hostname", + "inbox-entry" => [ + "comment" => "Incoming activity", "fields" => [ - "id" => ["type" => "tinyint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], - "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "The hostname"], + "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], + "activity-id" => ["type" => "varbinary(255)", "comment" => "id of the incoming activity"], + "object-id" => ["type" => "varbinary(255)", "comment" => ""], + "type" => ["type" => "varchar(64)", "comment" => "Type of the activity"], + "object-type" => ["type" => "varchar(64)", "comment" => "Type of the object activity"], + "object-object-type" => ["type" => "varchar(64)", "comment" => "Type of the object's object activity"], + "received" => ["type" => "datetime", "comment" => "Receiving date"], + "activity" => ["type" => "mediumtext", "comment" => "The JSON activity"], + "signer" => ["type" => "varchar(255)", "comment" => ""], ], "indexes" => [ "PRIMARY" => ["id"], - "name" => ["UNIQUE", "name"], + "activity-id" => ["UNIQUE", "activity-id"], + "object-id" => ["object-id"], + "received" => ["received"], + ] + ], + "inbox-entry-receiver" => [ + "comment" => "Receiver for the incoming activity", + "fields" => [ + "queue-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["inbox-entry" => "id"], "comment" => ""], + "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"], + ], + "indexes" => [ + "PRIMARY" => ["queue-id", "uid"], + "uid" => ["uid"], ] ], "inbox-status" => [ "comment" => "Status of ActivityPub inboxes", "fields" => [ "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"], + "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"], "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"], "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"], "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"], @@ -765,7 +828,8 @@ return [ "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"] ], "indexes" => [ - "PRIMARY" => ["url"] + "PRIMARY" => ["url"], + "uri-id" => ["uri-id"], ] ], "intro" => [ @@ -773,19 +837,21 @@ 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", "foreign" => ["user" => "uid"], "comment" => "User id"], - "fid" => ["type" => "int unsigned", "relation" => ["fcontact" => "id"], "comment" => ""], + "fid" => ["type" => "int unsigned", "relation" => ["fcontact" => "id"], "comment" => "deprecated"], "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""], + "suggest-cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Suggested contact"], "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], - "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], + "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"], "note" => ["type" => "text", "comment" => ""], "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], - "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""], + "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"], "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], ], "indexes" => [ "PRIMARY" => ["id"], "contact-id" => ["contact-id"], + "suggest-cid" => ["suggest-cid"], "uid" => ["uid"], ] ], @@ -883,12 +949,13 @@ return [ "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" => ""], + "type" => ["type" => "smallint 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" => ""], + "seen" => ["type" => "boolean", "default" => "0", "comment" => "Seen on the desktop"], + "dismissed" => ["type" => "boolean", "default" => "0", "comment" => "Dismissed via the API"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -901,7 +968,7 @@ return [ ] ], "notify" => [ - "comment" => "notifications", + "comment" => "[Deprecated] User notifications", "fields" => [ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""], @@ -1022,6 +1089,7 @@ return [ "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "desc" => ["type" => "text", "comment" => ""], "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"], + "photo-type" => ["type" => "tinyint unsigned", "comment" => "User avatar, user banner, contact avatar, contact banner or default"], "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"], "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""], @@ -1047,6 +1115,7 @@ return [ "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"], "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"], "resource-id" => ["resource-id"], + "uid_photo-type" => ["uid", "photo-type"], ] ], "post" => [ @@ -1092,8 +1161,19 @@ return [ ], "indexes" => [ "PRIMARY" => ["uri-id", "uid", "type", "tid"], - "uri-id" => ["tid"], - "uid" => ["uid"], + "tid" => ["tid"], + "uid_uri-id" => ["uid", "uri-id"], + ] + ], + "post-collection" => [ + "comment" => "Collection of 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"], + "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "0 - Featured"], + ], + "indexes" => [ + "PRIMARY" => ["uri-id", "type"], + "type" => ["type"], ] ], "post-content" => [ @@ -1124,6 +1204,23 @@ return [ "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"], ] ], + "post-delivery" => [ + "comment" => "Delivery data for posts for the batch processing", + "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"], + "inbox-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"], + "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"], + "created" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""], + "command" => ["type" => "varbinary(32)", "comment" => ""], + "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"], + "receivers" => ["type" => "mediumtext", "comment" => "JSON encoded array with the receiving contacts"], + ], + "indexes" => [ + "PRIMARY" => ["uri-id", "inbox-id"], + "inbox-id_created" => ["inbox-id", "created"], + "uid" => ["uid"], + ] + ], "post-delivery-data" => [ "comment" => "Delivery data for items", "fields" => [ @@ -1143,6 +1240,32 @@ return [ "PRIMARY" => ["uri-id"], ] ], + "post-history" => [ + "comment" => "Post history", + "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"], + "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "primary" => "1", "comment" => "Date of edit"], + "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", "edited"], + ] + ], "post-link" => [ "comment" => "Post related external links", "fields" => [ @@ -1161,13 +1284,13 @@ return [ "fields" => [ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], "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"], - "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "Media URL"], + "url" => ["type" => "varbinary(1024)", "not null" => "1", "comment" => "Media URL"], "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"], "mimetype" => ["type" => "varchar(60)", "comment" => ""], "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"], "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"], - "size" => ["type" => "int unsigned", "comment" => "Media size"], - "preview" => ["type" => "varbinary(255)", "comment" => "Preview URL"], + "size" => ["type" => "bigint unsigned", "comment" => "Media size"], + "preview" => ["type" => "varbinary(512)", "comment" => "Preview URL"], "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" => ""], @@ -1181,7 +1304,34 @@ return [ ], "indexes" => [ "PRIMARY" => ["id"], - "uri-id-url" => ["UNIQUE", "uri-id", "url"], + "uri-id-url" => ["UNIQUE", "uri-id", "url(512)"], + "uri-id-id" => ["uri-id", "id"], + ] + ], + "post-question" => [ + "comment" => "Question", + "fields" => [ + "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], + "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"], + "multiple" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Multiple choice"], + "voters" => ["type" => "int unsigned", "comment" => "Number of voters for this question"], + "end-time" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Question end time"], + ], + "indexes" => [ + "PRIMARY" => ["id"], + "uri-id" => ["UNIQUE", "uri-id"], + ] + ], + "post-question-option" => [ + "comment" => "Question option", + "fields" => [ + "id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "Id of the question"], + "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"], + "name" => ["type" => "varchar(255)", "comment" => "Name of the option"], + "replies" => ["type" => "int unsigned", "comment" => "Number of replies for this question option"], + ], + "indexes" => [ + "PRIMARY" => ["uri-id", "id"], ] ], "post-tag" => [ @@ -1290,13 +1440,13 @@ return [ "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" => ""], "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"], - "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The thread is pinned on the profile page"], + "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"], "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"], "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"], "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], - "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""], + "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Deprecated"], "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"], "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"], @@ -1317,7 +1467,6 @@ return [ "commented" => ["commented"], "uid_received" => ["uid", "received"], "uid_wall_received" => ["uid", "wall", "received"], - "uid_pinned" => ["uid", "pinned"], "uid_commented" => ["uid", "commented"], "uid_starred" => ["uid", "starred"], "uid_mention" => ["uid", "mention"], @@ -1328,7 +1477,7 @@ return [ "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"], - "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""], + "notification-type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""], ], "indexes" => [ "PRIMARY" => ["uid", "uri-id"], @@ -1338,12 +1487,13 @@ return [ "process" => [ "comment" => "Currently running system processes", "fields" => [ - "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => ""], + "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "The ID of the process"], + "hostname" => ["type" => "varchar(32)", "not null" => "1", "primary" => "1", "comment" => "The name of the host the process is ran on"], "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""], "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], ], "indexes" => [ - "PRIMARY" => ["pid"], + "PRIMARY" => ["pid", "hostname"], "command" => ["command"], ] ], @@ -1535,11 +1685,20 @@ return [ "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"], "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"], "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"], + "hidden" => ["type" => "boolean", "comment" => "This contact is hidden from the others"], + "is-blocked" => ["type" => "boolean", "comment" => "User is blocked by this contact"], + "pending" => ["type" => "boolean", "comment" => ""], "rel" => ["type" => "tinyint unsigned", "comment" => "The kind of the relation between the user and the contact"], "info" => ["type" => "mediumtext", "comment" => ""], "notify_new_posts" => ["type" => "boolean", "comment" => ""], + "remote_self" => ["type" => "boolean", "comment" => ""], "fetch_further_information" => ["type" => "tinyint unsigned", "comment" => ""], "ffi_keyword_denylist" => ["type" => "text", "comment" => ""], + "subhub" => ["type" => "boolean", "comment" => ""], + "hub-verify" => ["type" => "varchar(255)", "comment" => ""], + "protocol" => ["type" => "char(4)", "comment" => "Protocol of the contact"], + "rating" => ["type" => "tinyint", "comment" => "Automatically detected feed poll frequency"], + "priority" => ["type" => "tinyint unsigned", "comment" => "Feed poll priority"], ], "indexes" => [ "PRIMARY" => ["uid", "cid"],