use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
- define('DB_UPDATE_VERSION', 1474);
+ define('DB_UPDATE_VERSION', 1481);
}
return [
"poll" => ["type" => "varchar(255)", "comment" => ""],
"subscribe" => ["type" => "varchar(255)", "comment" => ""],
"last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
+ "next-update" => ["type" => "datetime", "comment" => "Next connection request"],
"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"],
"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"],
+ "local-data" => ["type" => "boolean", "comment" => "Is true when there are posts with this contact on the system"],
"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"],
"attag_uid" => ["attag(96)", "uid"],
"network_uid_lastupdate" => ["network", "uid", "last-update"],
"uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
+ "next-update" => ["next-update"],
+ "local-data-next-update" => ["local-data", "next-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"],
+ "gsid_uid_failed" => ["gsid", "uid", "failed"],
"uri-id" => ["uri-id"],
]
],
"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"],
+ "suspended" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is suspended"],
"nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"name" => ["type" => "varchar(255)", "comment" => ""],
"about" => ["type" => "text", "comment" => ""],
"uid" => ["uid"],
]
],
- "conversation" => [
- "comment" => "Raw data and structure information for messages",
- "fields" => [
- "item-uri" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "Original URI of the item - unrelated to the table with the same name"],
- "reply-to-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "URI to which this item is a reply"],
- "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation URI"],
- "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation link"],
- "protocol" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "255", "comment" => "The protocol of the item"],
- "direction" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "How the message arrived here: 1=push, 2=pull"],
- "source" => ["type" => "mediumtext", "comment" => "Original source"],
- "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Receiving date"],
- ],
- "indexes" => [
- "PRIMARY" => ["item-uri"],
- "conversation-uri" => ["conversation-uri"],
- "received" => ["received"],
- ]
- ],
"workerqueue" => [
"comment" => "Background tasks queue entries",
"fields" => [
"uri-id" => ["UNIQUE", "uri-id"],
]
],
+ "fetch-entry" => [
+ "comment" => "",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "url" => ["type" => "varbinary(255)", "comment" => "url that awaiting to be fetched"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of the fetch request"],
+ "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"], ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "url" => ["UNIQUE", "url"],
+ "created" => ["created"],
+ "wid" => ["wid"],
+ ]
+ ],
"fsuggest" => [
"comment" => "friend suggestion stuff",
"fields" => [
"received" => ["type" => "datetime", "comment" => "Receiving date"],
"activity" => ["type" => "mediumtext", "comment" => "The JSON activity"],
"signer" => ["type" => "varchar(255)", "comment" => ""],
- "push" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "push" => ["type" => "boolean", "comment" => "Is the entry pushed or have pulled it?"],
+ "trust" => ["type" => "boolean", "comment" => "Do we trust this entry?"],
"wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"], ],
"indexes" => [
"PRIMARY" => ["id"],
"target-uri-id" => ["target-uri-id"],
"parent-uri-id" => ["parent-uri-id"],
"seen_uid" => ["seen", "uid"],
+ "uid_type_parent-uri-id_actor-id" => ["uid", "type", "parent-uri-id", "actor-id"],
]
],
"notify" => [
"vid" => ["vid"],
]
],
+ "post-activity" => [
+ "comment" => "Original remote activity",
+ "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"],
+ "activity" => ["type" => "mediumtext", "comment" => "Original activity"],
+ "received" => ["type" => "datetime", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["uri-id"],
+ ]
+ ],
"post-category" => [
"comment" => "post relation to categories",
"fields" => [
"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"],
+ "author-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Author of the featured post"],
],
"indexes" => [
"PRIMARY" => ["uri-id", "type"],
"type" => ["type"],
+ "author-id" => ["author-id"],
]
],
"post-content" => [
"author-id_uid" => ["author-id", "uid"],
"author-id_received" => ["author-id", "received"],
"parent-uri-id_uid" => ["parent-uri-id", "uid"],
+ "uid_wall_received" => ["uid", "wall", "received"],
"uid_contactid" => ["uid", "contact-id"],
"uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
"uid_unseen" => ["uid", "unseen"],
"uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
]
],
+ "arrived-activity" => [
+ "comment" => "Id of arrived activities",
+ "fields" => [
+ "object-id" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "object id of the incoming activity"],
+ "received" => ["type" => "datetime", "comment" => "Receiving date"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["object-id"],
+ ],
+ "engine" => "MEMORY",
+ ],
+ "fetched-activity" => [
+ "comment" => "Id of fetched activities",
+ "fields" => [
+ "object-id" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "object id of fetched activity"],
+ "received" => ["type" => "datetime", "comment" => "Receiving date"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["object-id"],
+ ],
+ "engine" => "MEMORY",
+ ],
"worker-ipc" => [
"comment" => "Inter process communication between the frontend and the worker",
"fields" => [