use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
- define('DB_UPDATE_VERSION', 1417);
+ define('DB_UPDATE_VERSION', 1434);
}
return [
"email" => ["email(64)"],
]
],
+ "item-uri" => [
+ "comment" => "URI and GUID for items",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
+ "uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
+ "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uri" => ["UNIQUE", "uri"],
+ "guid" => ["guid"]
+ ]
+ ],
"contact" => [
"comment" => "contact table",
"fields" => [
"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)"],
- "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" => ""],
+ "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"],
"addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
"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"],
"uid_contact-type" => ["uid", "contact-type"],
"uid_self_contact-type" => ["uid", "self", "contact-type"],
"self_network_uid" => ["self", "network", "uid"],
- "gsid" => ["gsid"]
- ]
- ],
- "item-uri" => [
- "comment" => "URI and GUID for items",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
- "uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
- "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uri" => ["UNIQUE", "uri"],
- "guid" => ["guid"]
+ "gsid" => ["gsid"],
+ "uri-id" => ["uri-id"],
]
],
"tag" => [
"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" => [
"comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
"fields" => [
"url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
+ "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
"uuid" => ["type" => "varchar(255)", "comment" => ""],
"type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
"following" => ["type" => "varchar(255)", "comment" => ""],
"outbox" => ["type" => "varchar(255)", "comment" => ""],
"sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
"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" => ""],
"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" => ""],
"alias" => ["type" => "varchar(255)", "comment" => ""],
"pubkey" => ["type" => "text", "comment" => ""],
"followers" => ["followers(190)"],
"baseurl" => ["baseurl(190)"],
"sharedinbox" => ["sharedinbox(190)"],
- "gsid" => ["gsid"]
+ "gsid" => ["gsid"],
+ "uri-id" => ["UNIQUE", "uri-id"],
]
],
"application" => [
"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"],
"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" => ["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" => [
"uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
"cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
"uri" => ["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 event uri"],
"created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
"edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
"start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
"PRIMARY" => ["id"],
"uid_start" => ["uid", "start"],
"cid" => ["cid"],
+ "uri-id" => ["uri-id"],
]
],
"fcontact" => [
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
"guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "unique id"],
"url" => ["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 fcontact url"],
"name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"PRIMARY" => ["id"],
"addr" => ["addr(32)"],
"url" => ["UNIQUE", "url(190)"],
+ "uri-id" => ["UNIQUE", "uri-id"],
]
],
"fsuggest" => [
"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" => ""],
"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" => [
"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" => [
"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" => [
"PRIMARY" => ["uri-id"],
]
],
+ "post-link" => [
+ "comment" => "Post related external links",
+ "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" => "External URL"],
+ "mimetype" => ["type" => "varchar(60)", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uri-id-url" => ["UNIQUE", "uri-id", "url"],
+ ]
+ ],
"post-media" => [
"comment" => "Attached media",
"fields" => [
"post-user-id" => ["post-user-id"],
"commented" => ["commented"],
"uid_received" => ["uid", "received"],
+ "uid_wall_received" => ["uid", "wall", "received"],
"uid_pinned" => ["uid", "pinned"],
"uid_commented" => ["uid", "commented"],
"uid_starred" => ["uid", "starred"],
"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"]
- ]
- ],
];