use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
- define('DB_UPDATE_VERSION', 1428);
+ define('DB_UPDATE_VERSION', 1434);
}
return [
"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" => ""],
+ "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"],
"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" => ["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" => ""],
- "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "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"],
"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" => ""],
- "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "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" => ""],
"nurl_uid" => ["nurl(128)", "uid"],
"nick_uid" => ["nick(128)", "uid"],
"attag_uid" => ["attag(96)", "uid"],
- "dfrn-id" => ["dfrn-id(64)"],
- "issued-id" => ["issued-id(64)"],
"network_uid_lastupdate" => ["network", "uid", "last-update"],
"uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
"uid_lastitem" => ["uid", "last-item"],
"url" => ["url"]
]
],
- "clients" => [
- "comment" => "OAuth usage",
- "fields" => [
- "client_id" => ["type" => "varchar(20)", "not null" => "1", "primary" => "1", "comment" => ""],
- "pw" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => ""],
- "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
- "name" => ["type" => "text", "comment" => ""],
- "icon" => ["type" => "text", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
- ],
- "indexes" => [
- "PRIMARY" => ["client_id"],
- "uid" => ["uid"],
- ]
- ],
"permissionset" => [
"comment" => "",
"fields" => [
"nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"name" => ["type" => "varchar(255)", "comment" => ""],
"about" => ["type" => "text", "comment" => ""],
+ "xmpp" => ["type" => "varchar(255)", "comment" => "XMPP address"],
+ "matrix" => ["type" => "varchar(255)", "comment" => "Matrix address"],
"photo" => ["type" => "varchar(255)", "comment" => ""],
"header" => ["type" => "varchar(255)", "comment" => "Header picture"],
"addr" => ["type" => "varchar(255)", "comment" => ""],
"uid" => ["uid"],
]
],
- "auth_codes" => [
- "comment" => "OAuth usage",
- "fields" => [
- "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
- "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "foreign" => ["clients" => "client_id"],
- "comment" => ""],
- "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
- "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
- "scope" => ["type" => "varchar(250)", "not null" => "1", "default" => "", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "client_id" => ["client_id"]
- ]
- ],
"cache" => [
"comment" => "Stores temporary data",
"fields" => [
"k_expires" => ["k", "expires"],
]
],
- "challenge" => [
- "comment" => "",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "challenge" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "last_update" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "expire" => ["expire"],
- ]
- ],
"config" => [
"comment" => "main configuration storage",
"fields" => [
"received" => ["received"],
]
],
+ "workerqueue" => [
+ "comment" => "Background tasks queue entries",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
+ "command" => ["type" => "varchar(100)", "comment" => "Task command"],
+ "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
+ "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
+ "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
+ "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
+ "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
+ "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
+ "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "command" => ["command"],
+ "done_command_parameter" => ["done", "command", "parameter(64)"],
+ "done_executed" => ["done", "executed"],
+ "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
+ "done_priority_next_try" => ["done", "priority", "next_try"],
+ "done_pid_next_try" => ["done", "pid", "next_try"],
+ "done_pid_retrial" => ["done", "pid", "retrial"],
+ "done_pid_priority_created" => ["done", "pid", "priority", "created"]
+ ]
+ ],
"delayed-post" => [
"comment" => "Posts that are about to be distributed at a later time",
"fields" => [
"uri" => ["type" => "varchar(255)", "comment" => "URI of the post that will be distributed later"],
"uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
"delayed" => ["type" => "datetime", "comment" => "delay time"],
+ "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"],
],
"indexes" => [
"PRIMARY" => ["id"],
"uid_uri" => ["UNIQUE", "uid", "uri(190)"],
+ "wid" => ["wid"],
]
],
"diaspora-interaction" => [
"education" => ["type" => "text", "comment" => "Deprecated"],
"contact" => ["type" => "text", "comment" => "Deprecated"],
"homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
+ "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
"photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
"pub_keywords" => ["FULLTEXT", "pub_keywords"],
]
],
- "profile_check" => [
- "comment" => "DFRN remote auth use",
- "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"],
- "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
- "dfrn_id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "sec" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid" => ["uid"],
- "cid" => ["cid"],
- ]
- ],
"profile_field" => [
"comment" => "Custom profile fields",
"fields" => [
"PRIMARY" => ["id"]
]
],
- "tokens" => [
- "comment" => "OAuth usage",
+ "subscription" => [
+ "comment" => "Push Subscription for the API",
"fields" => [
- "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
- "secret" => ["type" => "text", "comment" => ""],
- "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "foreign" => ["clients" => "client_id"]],
- "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
- "scope" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
+ "application-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["application" => "id"], "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
+ "endpoint" => ["type" => "varchar(511)", "comment" => "Endpoint URL"],
+ "pubkey" => ["type" => "varchar(127)", "comment" => "User agent public key"],
+ "secret" => ["type" => "varchar(32)", "comment" => "Auth secret"],
+ "follow" => ["type" => "boolean", "comment" => ""],
+ "favourite" => ["type" => "boolean", "comment" => ""],
+ "reblog" => ["type" => "boolean", "comment" => ""],
+ "mention" => ["type" => "boolean", "comment" => ""],
+ "poll" => ["type" => "boolean", "comment" => ""],
+ "follow_request" => ["type" => "boolean", "comment" => ""],
+ "status" => ["type" => "boolean", "comment" => ""],
],
"indexes" => [
"PRIMARY" => ["id"],
- "client_id" => ["client_id"],
- "uid" => ["uid"]
+ "application-id_uid" => ["UNIQUE", "application-id", "uid"],
+ "uid_application-id" => ["uid", "application-id"],
]
],
"userd" => [
],
"engine" => "MEMORY",
],
- "workerqueue" => [
- "comment" => "Background tasks queue entries",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
- "command" => ["type" => "varchar(100)", "comment" => "Task command"],
- "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
- "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
- "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
- "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
- "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
- "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
- "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "command" => ["command"],
- "done_command_parameter" => ["done", "command", "parameter(64)"],
- "done_executed" => ["done", "executed"],
- "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
- "done_priority_next_try" => ["done", "priority", "next_try"],
- "done_pid_next_try" => ["done", "pid", "next_try"],
- "done_pid_retrial" => ["done", "pid", "retrial"],
- "done_pid_priority_created" => ["done", "pid", "priority", "created"]
- ]
- ],
];