3 * @copyright Copyright (C) 2010-2022, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 * Main database structure configuration file.
22 * Here are described all the tables, fields and indexes Friendica needs to work.
23 * The entry order is mostly alphabetic - with the exception of tables that are used in foreign keys.
25 * Syntax (braces indicate optionale values):
27 * "comment" => "Description of the table",
30 * "type" => "<field type>{(<field size>)} <unsigned>",
32 * {"extra" => "auto_increment",}
33 * {"default" => "<default value>",}
34 * {"default" => NULL_DATE,} (for datetime fields)
36 * {"foreign|relation" => ["<foreign key table name>" => "<foreign key field name>"],}
37 * "comment" => "Description of the fields"
42 * "PRIMARY" => ["<primary key field name>", ...],
43 * "<index name>" => [{"UNIQUE",} "<field name>{(<key size>)}", ...]
48 * Whenever possible prefer "foreign" before "relation" with the foreign keys.
49 * "foreign" adds true foreign keys on the database level, while "relation" is just an indicator of a table relation without any consequences
51 * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value below.
55 use Friendica\Database\DBA;
57 if (!defined('DB_UPDATE_VERSION')) {
58 define('DB_UPDATE_VERSION', 1507);
64 "comment" => "Global servers",
66 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
67 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
68 "nurl" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
69 "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
70 "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
71 "info" => ["type" => "text", "comment" => ""],
72 "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
73 "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
74 "active-week-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last week"],
75 "active-month-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last month"],
76 "active-halfyear-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last six month"],
77 "local-posts" => ["type" => "int unsigned", "comment" => "Number of local posts"],
78 "local-comments" => ["type" => "int unsigned", "comment" => "Number of local comments"],
79 "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
80 "poco" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
81 "noscrape" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
82 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
83 "protocol" => ["type" => "tinyint unsigned", "comment" => "The protocol of the server"],
84 "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
85 "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
86 "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
87 "detection-method" => ["type" => "tinyint unsigned", "comment" => "Method that had been used to detect that server"],
88 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
89 "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
90 "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last successful connection request"],
91 "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last failed connection request"],
92 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
93 "next_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Next connection request"],
97 "nurl" => ["UNIQUE", "nurl(190)"],
98 "next_contact" => ["next_contact"],
99 "network" => ["network"],
103 "comment" => "The local users",
105 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
106 "parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "The parent user that has full control about this user"],
107 "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
108 "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
109 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
110 "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
111 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
112 "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
113 "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
114 "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
115 "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
116 "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
117 "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
118 "last-activity" => ["type" => "date", "comment" => "Day of the last activity"],
119 "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
120 "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
121 "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
122 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
123 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
124 "spubkey" => ["type" => "text", "comment" => ""],
125 "sprvkey" => ["type" => "text", "comment" => ""],
126 "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
127 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
128 "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
129 "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
130 "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
131 "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
132 "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
133 "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
134 "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
135 "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
136 "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
137 "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
138 "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
139 "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
140 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Delay in days before deleting user-related posts. Scope is controlled by pConfig."],
141 "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
142 "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
143 "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
144 "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
145 "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
146 "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
147 "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
148 "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
149 "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
150 "openidserver" => ["type" => "text", "comment" => ""],
153 "PRIMARY" => ["uid"],
154 "nickname" => ["nickname(32)"],
155 "parent-uid" => ["parent-uid"],
157 "email" => ["email(64)"],
161 "comment" => "URI and GUID for items",
163 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
164 "uri" => ["type" => "varbinary(383)", "not null" => "1", "comment" => "URI of an item"],
165 "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
169 "uri" => ["UNIQUE", "uri"],
174 "comment" => "contact table",
176 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
177 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
178 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
179 "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"],
180 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network of the contact"],
181 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
182 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
183 "location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
184 "about" => ["type" => "text", "comment" => ""],
185 "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
186 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
187 "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
188 "avatar" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
189 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the avatar"],
190 "header" => ["type" => "varbinary(383)", "comment" => "Header picture"],
191 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
192 "nurl" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
193 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
194 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
195 "alias" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
196 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
197 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
198 "batch" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
199 "notify" => ["type" => "varbinary(383)", "comment" => ""],
200 "poll" => ["type" => "varbinary(383)", "comment" => ""],
201 "subscribe" => ["type" => "varbinary(383)", "comment" => ""],
202 "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
203 "next-update" => ["type" => "datetime", "comment" => "Next connection request"],
204 "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
205 "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
206 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
207 "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
208 "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
209 "last-discovery" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last follower discovery"],
210 "local-data" => ["type" => "boolean", "comment" => "Is true when there are posts with this contact on the system"],
211 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Node-wide block status"],
212 "block_reason" => ["type" => "text", "comment" => "Node-wide block reason"],
213 "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
214 "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Person, organisation, news, community, relay"],
215 "manually-approve" => ["type" => "boolean", "comment" => "Contact requests have to be approved manually"],
216 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
217 "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"],
218 "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"],
219 "baseurl" => ["type" => "varbinary(383)", "default" => "", "comment" => "baseurl of the contact"],
220 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
221 "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
222 // User depending fields
223 "reason" => ["type" => "text", "comment" => ""],
224 "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
225 "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
226 "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
227 "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"],
228 "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
229 "hub-verify" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
230 "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Automatically detected feed poll frequency"],
231 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Feed poll priority"],
232 "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
233 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
234 "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Contact request is pending"],
235 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
236 "info" => ["type" => "mediumtext", "comment" => ""],
237 "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
238 "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
239 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
240 // Deprecated, but still in use
241 "photo" => ["type" => "varbinary(383)", "default" => "", "comment" => "Link to the profile photo of the contact"],
242 "thumb" => ["type" => "varbinary(383)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
243 "micro" => ["type" => "varbinary(383)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
244 "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
245 "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
246 "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
247 "request" => ["type" => "varbinary(383)", "comment" => ""],
248 "confirm" => ["type" => "varbinary(383)", "comment" => ""],
249 "poco" => ["type" => "varbinary(383)", "comment" => ""],
250 "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
251 "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = false instead"],
252 "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = true instead"],
253 "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
254 // Deprecated fields that aren't in use anymore
255 "site-pubkey" => ["type" => "text", "comment" => "Deprecated"],
256 "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
257 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
258 "issued-id" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
259 "dfrn-id" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
260 "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
261 "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
262 "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
263 "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => "Deprecated"],
264 "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
268 "uid_name" => ["uid", "name(190)"],
269 "self_uid" => ["self", "uid"],
270 "alias_uid" => ["alias(128)", "uid"],
271 "pending_uid" => ["pending", "uid"],
272 "blocked_uid" => ["blocked", "uid"],
273 "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
274 "uid_network_batch" => ["uid", "network", "batch(64)"],
275 "batch_contact-type" => ["batch(64)", "contact-type"],
276 "addr_uid" => ["addr(128)", "uid"],
277 "nurl_uid" => ["nurl(128)", "uid"],
278 "nick_uid" => ["nick(128)", "uid"],
279 "attag_uid" => ["attag(96)", "uid"],
280 "network_uid_lastupdate" => ["network", "uid", "last-update"],
281 "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
282 "next-update" => ["next-update"],
283 "local-data-next-update" => ["local-data", "next-update"],
284 "uid_lastitem" => ["uid", "last-item"],
285 "baseurl" => ["baseurl(64)"],
286 "uid_contact-type" => ["uid", "contact-type"],
287 "uid_self_contact-type" => ["uid", "self", "contact-type"],
288 "self_network_uid" => ["self", "network", "uid"],
289 "gsid_uid_failed" => ["gsid", "uid", "failed"],
290 "uri-id" => ["uri-id"],
294 "comment" => "tags and mentions",
296 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
297 "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
298 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
299 "type" => ["type" => "tinyint unsigned", "comment" => "Type of the tag (Unknown, General Collection, Follower Collection or Account)"],
303 "type_name_url" => ["UNIQUE", "name", "url"],
310 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
311 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
312 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
313 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
314 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
315 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
319 "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["uid", "allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
323 "comment" => "Activity Verbs",
325 "id" => ["type" => "smallint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
326 "name" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""]
334 "2fa_app_specific_password" => [
335 "comment" => "Two-factor app-specific _password",
337 "id" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Password ID for revocation"],
338 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
339 "description" => ["type" => "varchar(255)", "comment" => "Description of the usage of the password"],
340 "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "comment" => "Hashed password"],
341 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the password was generated"],
342 "last_used" => ["type" => "datetime", "comment" => "Datetime the password was last used"],
346 "uid_description" => ["uid", "description(190)"],
349 "2fa_recovery_codes" => [
350 "comment" => "Two-factor authentication recovery codes",
352 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
353 "code" => ["type" => "varchar(50)", "not null" => "1", "primary" => "1", "comment" => "Recovery code string"],
354 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the code was generated"],
355 "used" => ["type" => "datetime", "comment" => "Datetime the code was used"],
358 "PRIMARY" => ["uid", "code"]
361 "2fa_trusted_browser" => [
362 "comment" => "Two-factor authentication trusted browsers",
364 "cookie_hash" => ["type" => "varchar(80)", "not null" => "1", "primary" => "1", "comment" => "Trusted cookie hash"],
365 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
366 "user_agent" => ["type" => "text", "comment" => "User agent string"],
367 "trusted" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Whenever this browser should be trusted or not"],
368 "created" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the trusted browser was recorded"],
369 "last_used" => ["type" => "datetime", "comment" => "Datetime the trusted browser was last used"],
372 "PRIMARY" => ["cookie_hash"],
376 "account-suggestion" => [
377 "comment" => "Account suggestion",
379 "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 account url"],
380 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
381 "level" => ["type" => "smallint unsigned", "comment" => "level of closeness"],
382 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "If set, this account will not be suggested again"], ],
384 "PRIMARY" => ["uid", "uri-id"],
385 "uri-id_uid" => ["uri-id", "uid"],
389 "comment" => "Remote and local accounts",
391 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
392 "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the account url"],
393 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
397 "uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
398 "uid_uri-id" => ["uid", "uri-id"],
402 "comment" => "registered addons",
404 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
405 "name" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "addon base (file)name"],
406 "version" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "currently unused"],
407 "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently always 1"],
408 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently unused"],
409 "timestamp" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "file timestamp to check for reloads"],
410 "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = has admin config, 0 = has no admin config"],
414 "installed_name" => ["installed", "name"],
415 "name" => ["UNIQUE", "name"],
419 "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
421 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
422 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
423 "uuid" => ["type" => "varbinary(255)", "comment" => ""],
424 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
425 "following" => ["type" => "varbinary(383)", "comment" => ""],
426 "followers" => ["type" => "varbinary(383)", "comment" => ""],
427 "inbox" => ["type" => "varbinary(383)", "not null" => "1", "comment" => ""],
428 "outbox" => ["type" => "varbinary(383)", "comment" => ""],
429 "sharedinbox" => ["type" => "varbinary(383)", "comment" => ""],
430 "featured" => ["type" => "varbinary(383)", "comment" => "Address for the collection of featured posts"],
431 "featured-tags" => ["type" => "varbinary(383)", "comment" => "Address for the collection of featured tags"],
432 "manually-approve" => ["type" => "boolean", "comment" => ""],
433 "discoverable" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is published in their directory"],
434 "suspended" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is suspended"],
435 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
436 "name" => ["type" => "varchar(255)", "comment" => ""],
437 "about" => ["type" => "text", "comment" => ""],
438 "xmpp" => ["type" => "varchar(255)", "comment" => "XMPP address"],
439 "matrix" => ["type" => "varchar(255)", "comment" => "Matrix address"],
440 "photo" => ["type" => "varbinary(383)", "comment" => ""],
441 "header" => ["type" => "varbinary(383)", "comment" => "Header picture"],
442 "addr" => ["type" => "varchar(255)", "comment" => ""],
443 "alias" => ["type" => "varbinary(383)", "comment" => ""],
444 "pubkey" => ["type" => "text", "comment" => ""],
445 "subscribe" => ["type" => "varbinary(383)", "comment" => ""],
446 "baseurl" => ["type" => "varbinary(383)", "comment" => "baseurl of the ap contact"],
447 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
448 "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
449 "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
450 "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
451 "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
452 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
455 "PRIMARY" => ["url"],
456 "addr" => ["addr(32)"],
457 "alias" => ["alias(190)"],
458 "followers" => ["followers(190)"],
459 "baseurl" => ["baseurl(190)"],
460 "sharedinbox" => ["sharedinbox(190)"],
462 "uri-id" => ["UNIQUE", "uri-id"],
466 "comment" => "OAuth application",
468 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
469 "client_id" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
470 "client_secret" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
471 "name" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
472 "redirect_uri" => ["type" => "varbinary(383)", "not null" => "1", "comment" => ""],
473 "website" => ["type" => "varbinary(383)", "comment" => ""],
474 "scopes" => ["type" => "varchar(255)", "comment" => ""],
475 "read" => ["type" => "boolean", "comment" => "Read scope"],
476 "write" => ["type" => "boolean", "comment" => "Write scope"],
477 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
478 "push" => ["type" => "boolean", "comment" => "Push scope"],
482 "client_id" => ["UNIQUE", "client_id"]
485 "application-marker" => [
486 "comment" => "Timeline marker",
488 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
489 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
490 "timeline" => ["type" => "varchar(64)", "not null" => "1", "primary" => "1", "comment" => "Marker (home, notifications)"],
491 "last_read_id" => ["type" => "varbinary(383)", "comment" => "Marker id for the timeline"],
492 "version" => ["type" => "smallint unsigned", "comment" => "Version number"],
493 "updated_at" => ["type" => "datetime", "comment" => "creation time"],
496 "PRIMARY" => ["application-id", "uid", "timeline"],
500 "application-token" => [
501 "comment" => "OAuth user token",
503 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
504 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
505 "code" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
506 "access_token" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
507 "created_at" => ["type" => "datetime", "not null" => "1", "comment" => "creation time"],
508 "scopes" => ["type" => "varchar(255)", "comment" => ""],
509 "read" => ["type" => "boolean", "comment" => "Read scope"],
510 "write" => ["type" => "boolean", "comment" => "Write scope"],
511 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
512 "push" => ["type" => "boolean", "comment" => "Push scope"],
515 "PRIMARY" => ["application-id", "uid"],
516 "uid_id" => ["uid", "application-id"],
520 "comment" => "file attachments",
522 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
523 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
524 "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
525 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
526 "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
527 "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
528 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
529 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
530 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
531 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
532 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
533 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
534 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
535 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
536 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
544 "comment" => "Stores temporary data",
546 "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
547 "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
548 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
549 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
553 "k_expires" => ["k", "expires"],
557 "comment" => "main configuration storage",
559 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
560 "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
561 "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
562 "v" => ["type" => "mediumtext", "comment" => ""],
566 "cat_k" => ["UNIQUE", "cat", "k"],
569 "contact-relation" => [
570 "comment" => "Contact relations",
572 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "contact the related contact had interacted with"],
573 "relation-cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "related contact who had interacted with the contact"],
574 "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction"],
575 "follow-updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last update of the contact relationship"],
576 "follows" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
579 "PRIMARY" => ["cid", "relation-cid"],
580 "relation-cid" => ["relation-cid"],
584 "comment" => "private messages",
586 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
587 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
588 "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
589 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
590 "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
591 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
592 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
593 "subject" => ["type" => "text", "comment" => "subject of initial message"],
601 "comment" => "Background tasks queue entries",
603 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
604 "command" => ["type" => "varchar(100)", "comment" => "Task command"],
605 "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
606 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
607 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
608 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
609 "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
610 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
611 "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
612 "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
616 "command" => ["command"],
617 "done_command_parameter" => ["done", "command", "parameter(64)"],
618 "done_executed" => ["done", "executed"],
619 "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
620 "done_priority_next_try" => ["done", "priority", "next_try"],
621 "done_pid_next_try" => ["done", "pid", "next_try"],
622 "done_pid_retrial" => ["done", "pid", "retrial"],
623 "done_pid_priority_created" => ["done", "pid", "priority", "created"]
627 "comment" => "Posts that are about to be distributed at a later time",
629 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
630 "uri" => ["type" => "varbinary(383)", "comment" => "URI of the post that will be distributed later"],
631 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
632 "delayed" => ["type" => "datetime", "comment" => "delay time"],
633 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"],
637 "uid_uri" => ["UNIQUE", "uid", "uri(190)"],
641 "delivery-queue" => [
642 "comment" => "Delivery data for posts for the batch processing",
644 "gsid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Target server"],
645 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Delivered post"],
646 "created" => ["type" => "datetime", "comment" => ""],
647 "command" => ["type" => "varbinary(32)", "comment" => ""],
648 "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Target contact"],
649 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
650 "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
653 "PRIMARY" => ["uri-id", "gsid"],
654 "gsid_created" => ["gsid", "created"],
659 "diaspora-contact" => [
660 "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
662 "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 contact URL"],
663 "addr" => ["type" => "varchar(255)", "comment" => ""],
664 "alias" => ["type" => "varchar(255)", "comment" => ""],
665 "nick" => ["type" => "varchar(255)", "comment" => ""],
666 "name" => ["type" => "varchar(255)", "comment" => ""],
667 "given-name" => ["type" => "varchar(255)", "comment" => ""],
668 "family-name" => ["type" => "varchar(255)", "comment" => ""],
669 "photo" => ["type" => "varchar(255)", "comment" => ""],
670 "photo-medium" => ["type" => "varchar(255)", "comment" => ""],
671 "photo-small" => ["type" => "varchar(255)", "comment" => ""],
672 "batch" => ["type" => "varchar(255)", "comment" => ""],
673 "notify" => ["type" => "varchar(255)", "comment" => ""],
674 "poll" => ["type" => "varchar(255)", "comment" => ""],
675 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
676 "searchable" => ["type" => "boolean", "comment" => ""],
677 "pubkey" => ["type" => "text", "comment" => ""],
678 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
679 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
680 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
681 "interacting_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts this contact interactes with"],
682 "interacted_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts that interacted with this contact"],
683 "post_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts and comments"],
686 "PRIMARY" => ["uri-id"],
687 "addr" => ["UNIQUE", "addr"],
688 "alias" => ["alias"],
692 "diaspora-interaction" => [
693 "comment" => "Signed Diaspora Interaction",
695 "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"],
696 "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
699 "PRIMARY" => ["uri-id"]
703 "comment" => "ActivityPub endpoints - used in the ActivityPub implementation",
705 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
706 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
707 "owner-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
710 "PRIMARY" => ["url"],
711 "owner-uri-id_type" => ["UNIQUE", "owner-uri-id", "type"],
715 "comment" => "Events",
717 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
718 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
719 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
720 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
721 "uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
722 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the event uri"],
723 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
724 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
725 "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
726 "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
727 "summary" => ["type" => "text", "comment" => "short description or title of the event"],
728 "desc" => ["type" => "text", "comment" => "event description"],
729 "location" => ["type" => "text", "comment" => "event location"],
730 "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
731 "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
732 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
733 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
734 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
735 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
736 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
740 "uid_start" => ["uid", "start"],
742 "uri-id" => ["uri-id"],
748 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
749 "url" => ["type" => "varbinary(383)", "comment" => "url that awaiting to be fetched"],
750 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of the fetch request"],
751 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"], ],
754 "url" => ["UNIQUE", "url"],
755 "created" => ["created"],
760 "comment" => "friend suggestion stuff",
762 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
763 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
764 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
765 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
766 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
767 "request" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
768 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
769 "note" => ["type" => "text", "comment" => ""],
770 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
779 "comment" => "privacy groups, group info",
781 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
782 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
783 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
784 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
785 "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Contact id of forum. When this field is filled then the members are synced automatically."],
786 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
795 "comment" => "privacy groups, member info",
797 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
798 "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "groups.id of the associated group"],
799 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
803 "contactid" => ["contact-id"],
804 "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
808 "comment" => "Tags that the server has subscribed",
810 "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["gserver" => "id"], "primary" => "1",
811 "comment" => "The id of the gserver"],
812 "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
815 "PRIMARY" => ["gserver-id", "tag"],
820 "comment" => "addon hook registry",
822 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
823 "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
824 "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
825 "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
826 "priority" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => "not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order"],
830 "priority" => ["priority"],
831 "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
835 "comment" => "Incoming activity",
837 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
838 "activity-id" => ["type" => "varbinary(383)", "comment" => "id of the incoming activity"],
839 "object-id" => ["type" => "varbinary(383)", "comment" => ""],
840 "in-reply-to-id" => ["type" => "varbinary(383)", "comment" => ""],
841 "conversation" => ["type" => "varbinary(383)", "comment" => ""],
842 "type" => ["type" => "varchar(64)", "comment" => "Type of the activity"],
843 "object-type" => ["type" => "varchar(64)", "comment" => "Type of the object activity"],
844 "object-object-type" => ["type" => "varchar(64)", "comment" => "Type of the object's object activity"],
845 "received" => ["type" => "datetime", "comment" => "Receiving date"],
846 "activity" => ["type" => "mediumtext", "comment" => "The JSON activity"],
847 "signer" => ["type" => "varchar(255)", "comment" => ""],
848 "push" => ["type" => "boolean", "comment" => "Is the entry pushed or have pulled it?"],
849 "trust" => ["type" => "boolean", "comment" => "Do we trust this entry?"],
850 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"], ],
853 "activity-id" => ["UNIQUE", "activity-id"],
854 "object-id" => ["object-id"],
855 "received" => ["received"],
859 "inbox-entry-receiver" => [
860 "comment" => "Receiver for the incoming activity",
862 "queue-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["inbox-entry" => "id"], "comment" => ""],
863 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
866 "PRIMARY" => ["queue-id", "uid"],
871 "comment" => "Status of ActivityPub inboxes",
873 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
874 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
875 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "ID of the related server"],
876 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
877 "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
878 "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
879 "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
880 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
881 "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
884 "PRIMARY" => ["url"],
885 "uri-id" => ["uri-id"],
892 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
893 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
894 "fid" => ["type" => "int unsigned", "comment" => "deprecated"],
895 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
896 "suggest-cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Suggested contact"],
897 "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
898 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
899 "note" => ["type" => "text", "comment" => ""],
900 "hash" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
901 "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
902 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
903 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
907 "contact-id" => ["contact-id"],
908 "suggest-cid" => ["suggest-cid"],
913 "comment" => "A key value storage",
915 "k" => ["type" => "varbinary(50)", "not null" => "1", "primary" => "1", "comment" => ""],
916 "v" => ["type" => "mediumtext", "comment" => ""],
917 "updated_at" => ["type" => "int unsigned", "not null" => "1", "comment" => "timestamp of the last update"],
926 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
927 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
928 "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
929 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
930 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
934 "name_expires" => ["name", "expires"]
938 "comment" => "private messages",
940 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
941 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
942 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
943 "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
944 "from-photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
945 "from-url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
946 "contact-id" => ["type" => "varbinary(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"],
947 "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"],
948 "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"],
949 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
950 "body" => ["type" => "mediumtext", "comment" => ""],
951 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
952 "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
953 "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
954 "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
955 "uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
956 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related mail"],
957 "parent-uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
958 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related mail"],
959 "thr-parent" => ["type" => "varbinary(383)", "comment" => ""],
960 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
961 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
965 "uid_seen" => ["uid", "seen"],
966 "convid" => ["convid"],
967 "uri" => ["uri(64)"],
968 "parent-uri" => ["parent-uri(64)"],
969 "contactid" => ["contact-id(32)"],
970 "author-id" => ["author-id"],
971 "uri-id" => ["uri-id"],
972 "parent-uri-id" => ["parent-uri-id"],
973 "thr-parent-id" => ["thr-parent-id"],
977 "comment" => "Mail account data for fetching mails",
979 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
980 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
981 "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
982 "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
983 "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
984 "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
985 "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
986 "pass" => ["type" => "text", "comment" => ""],
987 "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
988 "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
989 "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
990 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
991 "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
999 "comment" => "table of accounts that can manage each other",
1001 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1002 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1003 "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1006 "PRIMARY" => ["id"],
1007 "uid_mid" => ["UNIQUE", "uid", "mid"],
1012 "comment" => "notifications",
1014 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1015 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1016 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1017 "type" => ["type" => "smallint unsigned", "comment" => ""],
1018 "actor-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the actor that caused the notification"],
1019 "target-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
1020 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1021 "created" => ["type" => "datetime", "comment" => ""],
1022 "seen" => ["type" => "boolean", "default" => "0", "comment" => "Seen on the desktop"],
1023 "dismissed" => ["type" => "boolean", "default" => "0", "comment" => "Dismissed via the API"],
1026 "PRIMARY" => ["id"],
1027 "uid_vid_type_actor-id_target-uri-id" => ["UNIQUE", "uid", "vid", "type", "actor-id", "target-uri-id"],
1029 "actor-id" => ["actor-id"],
1030 "target-uri-id" => ["target-uri-id"],
1031 "parent-uri-id" => ["parent-uri-id"],
1032 "seen_uid" => ["seen", "uid"],
1033 "uid_type_parent-uri-id_actor-id" => ["uid", "type", "parent-uri-id", "actor-id"],
1037 "comment" => "[Deprecated] User notifications",
1039 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1040 "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1041 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1042 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1043 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1044 "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1045 "msg" => ["type" => "mediumtext", "comment" => ""],
1046 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1047 "link" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1048 "iid" => ["type" => "int unsigned", "comment" => ""],
1049 "parent" => ["type" => "int unsigned", "comment" => ""],
1050 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
1051 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1052 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1053 "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
1054 "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
1055 "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
1056 "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
1059 "PRIMARY" => ["id"],
1060 "seen_uid_date" => ["seen", "uid", "date"],
1061 "uid_date" => ["uid", "date"],
1062 "uid_type_link" => ["uid", "type", "link(190)"],
1063 "uri-id" => ["uri-id"],
1064 "parent-uri-id" => ["parent-uri-id"],
1067 "notify-threads" => [
1070 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1071 "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["notify" => "id"], "comment" => ""],
1072 "master-parent-item" => ["type" => "int unsigned", "comment" => "Deprecated"],
1073 "master-parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1074 "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1075 "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"],
1076 "comment" => "User id"],
1079 "PRIMARY" => ["id"],
1080 "master-parent-uri-id" => ["master-parent-uri-id"],
1081 "receiver-uid" => ["receiver-uid"],
1082 "notify-id" => ["notify-id"],
1086 "comment" => "cache for OEmbed queries",
1088 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "page url"],
1089 "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
1090 "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
1091 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1094 "PRIMARY" => ["url", "maxwidth"],
1095 "created" => ["created"],
1098 "openwebauth-token" => [
1099 "comment" => "Store OpenWebAuth token to verify contacts",
1101 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1102 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id - currently unused"],
1103 "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
1104 "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
1105 "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1106 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1109 "PRIMARY" => ["id"],
1114 "comment" => "cache for 'parse_url' queries",
1116 "url_hash" => ["type" => "binary(64)", "not null" => "1", "primary" => "1", "comment" => "page url hash"],
1117 "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
1118 "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
1119 "url" => ["type" => "text", "not null" => "1", "comment" => "page url"],
1120 "content" => ["type" => "mediumtext", "comment" => "page data"],
1121 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1122 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of expiration"],
1125 "PRIMARY" => ["url_hash", "guessing", "oembed"],
1126 "created" => ["created"],
1127 "expires" => ["expires"],
1131 "comment" => "personal (per user) configuration storage",
1133 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Primary key"],
1134 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1135 "cat" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "Category"],
1136 "k" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "Key"],
1137 "v" => ["type" => "mediumtext", "comment" => "Value"],
1140 "PRIMARY" => ["id"],
1141 "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
1145 "comment" => "photo storage",
1147 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1148 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid", "on delete" => "restrict"], "comment" => "Owner User id"],
1149 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "contact.id"],
1150 "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
1151 "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
1152 "hash" => ["type" => "char(32)", "comment" => "hash value of the photo"],
1153 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
1154 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
1155 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1156 "desc" => ["type" => "text", "comment" => ""],
1157 "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
1158 "photo-type" => ["type" => "tinyint unsigned", "comment" => "User avatar, user banner, contact avatar, contact banner or default"],
1159 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1160 "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
1161 "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1162 "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1163 "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1164 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the photo"],
1165 "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
1166 "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1167 "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1168 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
1169 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
1170 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
1171 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
1172 "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"],
1173 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
1174 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
1175 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1178 "PRIMARY" => ["id"],
1179 "contactid" => ["contact-id"],
1180 "uid_contactid" => ["uid", "contact-id"],
1181 "uid_profile" => ["uid", "profile"],
1182 "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
1183 "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
1184 "resource-id" => ["resource-id"],
1185 "uid_photo-type" => ["uid", "photo-type"],
1189 "comment" => "Structure for all posts",
1191 "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"],
1192 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1193 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1194 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1195 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1196 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1197 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1198 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1199 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1200 "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"],
1201 "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"],
1202 "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"],
1203 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1204 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1205 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1206 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1207 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1208 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"]
1211 "PRIMARY" => ["uri-id"],
1212 "parent-uri-id" => ["parent-uri-id"],
1213 "thr-parent-id" => ["thr-parent-id"],
1214 "external-id" => ["external-id"],
1215 "owner-id" => ["owner-id"],
1216 "author-id" => ["author-id"],
1217 "causer-id" => ["causer-id"],
1221 "post-activity" => [
1222 "comment" => "Original remote activity",
1224 "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"],
1225 "activity" => ["type" => "mediumtext", "comment" => "Original activity"],
1226 "received" => ["type" => "datetime", "comment" => ""],
1229 "PRIMARY" => ["uri-id"],
1232 "post-category" => [
1233 "comment" => "post relation to categories",
1235 "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"],
1236 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1237 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1238 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1241 "PRIMARY" => ["uri-id", "uid", "type", "tid"],
1243 "uid_uri-id" => ["uid", "uri-id"],
1246 "post-collection" => [
1247 "comment" => "Collection of posts",
1249 "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"],
1250 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "0 - Featured"],
1251 "author-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Author of the featured post"],
1254 "PRIMARY" => ["uri-id", "type"],
1256 "author-id" => ["author-id"],
1260 "comment" => "Content for all posts",
1262 "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"],
1263 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1264 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1265 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1266 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1267 "quote-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the quoted uri"],
1268 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1269 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1270 "language" => ["type" => "text", "comment" => "Language information about this post"],
1271 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1272 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1273 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1274 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1275 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1276 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1277 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1278 "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"],
1279 "plink" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1282 "PRIMARY" => ["uri-id"],
1283 "plink" => ["plink(191)"],
1284 "resource-id" => ["resource-id"],
1285 "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
1286 "quote-uri-id" => ["quote-uri-id"],
1289 "post-delivery" => [
1290 "comment" => "Delivery data for posts for the batch processing",
1292 "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"],
1293 "inbox-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
1294 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
1295 "created" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
1296 "command" => ["type" => "varbinary(32)", "comment" => ""],
1297 "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
1298 "receivers" => ["type" => "mediumtext", "comment" => "JSON encoded array with the receiving contacts"],
1301 "PRIMARY" => ["uri-id", "inbox-id"],
1302 "inbox-id_created" => ["inbox-id", "created"],
1306 "post-delivery-data" => [
1307 "comment" => "Delivery data for items",
1309 "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"],
1310 "postopts" => ["type" => "text", "comment" => "External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery"],
1311 "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
1312 "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
1313 "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
1314 "queue_failed" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of unsuccessful deliveries, used as item.delivery_queue_failed"],
1315 "activitypub" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via ActivityPub"],
1316 "dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via DFRN"],
1317 "legacy_dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via legacy DFRN"],
1318 "diaspora" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via Diaspora"],
1319 "ostatus" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via OStatus"],
1322 "PRIMARY" => ["uri-id"],
1326 "comment" => "Post history",
1328 "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"],
1329 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "primary" => "1", "comment" => "Date of edit"],
1330 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1331 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1332 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1333 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1334 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1335 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1336 "language" => ["type" => "text", "comment" => "Language information about this post"],
1337 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1338 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1339 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1340 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1341 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1342 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1343 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1344 "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"],
1345 "plink" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1348 "PRIMARY" => ["uri-id", "edited"],
1352 "comment" => "Post related external links",
1354 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1355 "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"],
1356 "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "External URL"],
1357 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1358 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1359 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1360 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the link"],
1363 "PRIMARY" => ["id"],
1364 "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1368 "comment" => "Attached media",
1370 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1371 "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"],
1372 "url" => ["type" => "varbinary(1024)", "not null" => "1", "comment" => "Media URL"],
1373 "media-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the activities uri-id"],
1374 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
1375 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1376 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1377 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1378 "size" => ["type" => "bigint unsigned", "comment" => "Media size"],
1379 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the image"],
1380 "preview" => ["type" => "varbinary(512)", "comment" => "Preview URL"],
1381 "preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
1382 "preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
1383 "description" => ["type" => "text", "comment" => ""],
1384 "name" => ["type" => "varchar(255)", "comment" => "Name of the media"],
1385 "author-url" => ["type" => "varbinary(383)", "comment" => "URL of the author of the media"],
1386 "author-name" => ["type" => "varchar(255)", "comment" => "Name of the author of the media"],
1387 "author-image" => ["type" => "varbinary(383)", "comment" => "Image of the author of the media"],
1388 "publisher-url" => ["type" => "varbinary(383)", "comment" => "URL of the publisher of the media"],
1389 "publisher-name" => ["type" => "varchar(255)", "comment" => "Name of the publisher of the media"],
1390 "publisher-image" => ["type" => "varbinary(383)", "comment" => "Image of the publisher of the media"],
1393 "PRIMARY" => ["id"],
1394 "uri-id-url" => ["UNIQUE", "uri-id", "url(512)"],
1395 "uri-id-id" => ["uri-id", "id"],
1396 "media-uri-id" => ["media-uri-id"],
1399 "post-question" => [
1400 "comment" => "Question",
1402 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1403 "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"],
1404 "multiple" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Multiple choice"],
1405 "voters" => ["type" => "int unsigned", "comment" => "Number of voters for this question"],
1406 "end-time" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Question end time"],
1409 "PRIMARY" => ["id"],
1410 "uri-id" => ["UNIQUE", "uri-id"],
1413 "post-question-option" => [
1414 "comment" => "Question option",
1416 "id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "Id of the question"],
1417 "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"],
1418 "name" => ["type" => "varchar(255)", "comment" => "Name of the option"],
1419 "replies" => ["type" => "int unsigned", "comment" => "Number of replies for this question option"],
1422 "PRIMARY" => ["uri-id", "id"],
1426 "comment" => "post relation to tags",
1428 "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"],
1429 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1430 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1431 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Contact id of the mentioned public contact"],
1434 "PRIMARY" => ["uri-id", "type", "tid", "cid"],
1440 "comment" => "Thread related data",
1442 "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"],
1443 "conversation-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the conversation uri"],
1444 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1445 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1446 "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"],
1447 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1448 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1449 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1450 "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"],
1451 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1454 "PRIMARY" => ["uri-id"],
1455 "conversation-id" => ["conversation-id"],
1456 "owner-id" => ["owner-id"],
1457 "author-id" => ["author-id"],
1458 "causer-id" => ["causer-id"],
1459 "received" => ["received"],
1460 "commented" => ["commented"],
1464 "comment" => "User specific post data",
1466 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
1467 "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"],
1468 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1469 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1470 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1471 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1472 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1473 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1474 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1475 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1476 "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"],
1477 "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"],
1478 "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"],
1479 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1480 "post-reason" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Reason why the post arrived at the user"],
1481 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1482 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1483 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1484 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1485 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"],
1486 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1487 "protocol" => ["type" => "tinyint unsigned", "comment" => "Protocol used to deliver the item for this user"],
1488 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1489 "event-id" => ["type" => "int unsigned", "foreign" => ["event" => "id"], "comment" => "Used to link to the event.id"],
1490 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1491 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1492 "notification-type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1493 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1494 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1495 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1498 "PRIMARY" => ["id"],
1499 "uid_uri-id" => ["UNIQUE", "uid", "uri-id"],
1500 "uri-id" => ["uri-id"],
1501 "parent-uri-id" => ["parent-uri-id"],
1502 "thr-parent-id" => ["thr-parent-id"],
1503 "external-id" => ["external-id"],
1504 "owner-id" => ["owner-id"],
1505 "author-id" => ["author-id"],
1506 "causer-id" => ["causer-id"],
1508 "contact-id" => ["contact-id"],
1509 "event-id" => ["event-id"],
1511 "author-id_uid" => ["author-id", "uid"],
1512 "author-id_received" => ["author-id", "received"],
1513 "parent-uri-id_uid" => ["parent-uri-id", "uid"],
1514 "uid_wall_received" => ["uid", "wall", "received"],
1515 "uid_contactid" => ["uid", "contact-id"],
1516 "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
1517 "uid_unseen" => ["uid", "unseen"],
1518 "uid_hidden_uri-id" => ["uid", "hidden", "uri-id"],
1521 "post-thread-user" => [
1522 "comment" => "Thread related data per user",
1524 "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"],
1525 "conversation-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the conversation uri"],
1526 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1527 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1528 "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"],
1529 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1530 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1531 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1532 "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"],
1533 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1534 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1535 "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
1536 "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1537 "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"],
1538 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1539 "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1540 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1541 "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
1542 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1543 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1544 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1545 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1546 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1547 "post-user-id" => ["type" => "int unsigned", "foreign" => ["post-user" => "id"], "comment" => "Id of the post-user table"],
1550 "PRIMARY" => ["uid", "uri-id"],
1551 "uri-id" => ["uri-id"],
1552 "conversation-id" => ["conversation-id"],
1553 "owner-id" => ["owner-id"],
1554 "author-id" => ["author-id"],
1555 "causer-id" => ["causer-id"],
1557 "contact-id" => ["contact-id"],
1559 "post-user-id" => ["post-user-id"],
1560 "commented" => ["commented"],
1561 "uid_received" => ["uid", "received"],
1562 "uid_wall_received" => ["uid", "wall", "received"],
1563 "uid_commented" => ["uid", "commented"],
1564 "uid_starred" => ["uid", "starred"],
1565 "uid_mention" => ["uid", "mention"],
1568 "post-user-notification" => [
1569 "comment" => "User post notifications",
1571 "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"],
1572 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1573 "notification-type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1576 "PRIMARY" => ["uid", "uri-id"],
1577 "uri-id" => ["uri-id"],
1581 "comment" => "Currently running system processes",
1583 "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "The ID of the process"],
1584 "hostname" => ["type" => "varchar(32)", "not null" => "1", "primary" => "1", "comment" => "The name of the host the process is ran on"],
1585 "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
1586 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1589 "PRIMARY" => ["pid", "hostname"],
1590 "command" => ["command"],
1594 "comment" => "user profiles data",
1596 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1597 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1598 "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1599 "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
1600 "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
1601 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1602 "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1603 "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
1604 "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1605 "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1606 "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1607 "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1608 "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1609 "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1610 "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
1611 "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1612 "with" => ["type" => "text", "comment" => "Deprecated"],
1613 "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
1614 "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1615 "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1616 "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1617 "pub_keywords" => ["type" => "text", "comment" => ""],
1618 "prv_keywords" => ["type" => "text", "comment" => ""],
1619 "likes" => ["type" => "text", "comment" => "Deprecated"],
1620 "dislikes" => ["type" => "text", "comment" => "Deprecated"],
1621 "about" => ["type" => "text", "comment" => "Profile description"],
1622 "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1623 "music" => ["type" => "text", "comment" => "Deprecated"],
1624 "book" => ["type" => "text", "comment" => "Deprecated"],
1625 "tv" => ["type" => "text", "comment" => "Deprecated"],
1626 "film" => ["type" => "text", "comment" => "Deprecated"],
1627 "interest" => ["type" => "text", "comment" => "Deprecated"],
1628 "romance" => ["type" => "text", "comment" => "Deprecated"],
1629 "work" => ["type" => "text", "comment" => "Deprecated"],
1630 "education" => ["type" => "text", "comment" => "Deprecated"],
1631 "contact" => ["type" => "text", "comment" => "Deprecated"],
1632 "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1633 "homepage_verified" => ["type" => "boolean", "not null" => 1, "default" => "0", "comment" => "was the homepage verified by a rel-me link back to the profile"],
1634 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
1635 "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
1636 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1637 "thumb" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1638 "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
1639 "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
1642 "PRIMARY" => ["id"],
1643 "uid_is-default" => ["uid", "is-default"],
1644 "pub_keywords" => ["FULLTEXT", "pub_keywords"],
1647 "profile_field" => [
1648 "comment" => "Custom profile fields",
1650 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1651 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner user id"],
1652 "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
1653 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this profile field - 0 = public"],
1654 "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
1655 "value" => ["type" => "text", "comment" => "Value of the field"],
1656 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
1657 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
1660 "PRIMARY" => ["id"],
1662 "order" => ["order"],
1666 "push_subscriber" => [
1667 "comment" => "Used for OStatus: Contains feed subscribers",
1669 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1670 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1671 "callback_url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1672 "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1673 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1674 "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1675 "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
1676 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1677 "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
1678 "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1681 "PRIMARY" => ["id"],
1682 "next_try" => ["next_try"],
1687 "comment" => "registrations requiring admin approval",
1689 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1690 "hash" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1691 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1692 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1693 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1694 "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1695 "note" => ["type" => "text", "comment" => ""],
1698 "PRIMARY" => ["id"],
1705 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1706 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Reporting user"],
1707 "reporter-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Reporting contact"],
1708 "cid" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["contact" => "id"], "comment" => "Reported contact"],
1709 "comment" => ["type" => "text", "comment" => "Report"],
1710 "category" => ["type" => "varchar(20)", "comment" => "Category of the report (spam, violation, other)"],
1711 "rules" => ["type" => "text", "comment" => "Violated rules"],
1712 "forward" => ["type" => "boolean", "comment" => "Forward the report to the remote server"],
1713 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1714 "status" => ["type" => "tinyint unsigned", "comment" => "Status of the report"],
1717 "PRIMARY" => ["id"],
1720 "reporter-id" => ["reporter-id"],
1726 "rid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["report" => "id"], "comment" => "Report id"],
1727 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Uri-id of the reported post"],
1728 "status" => ["type" => "tinyint unsigned", "comment" => "Status of the reported post"],
1731 "PRIMARY" => ["rid", "uri-id"],
1732 "uri-id" => ["uri-id"],
1738 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1739 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1740 "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1743 "PRIMARY" => ["id"],
1744 "uid_term" => ["uid", "term(64)"],
1745 "term" => ["term(64)"]
1749 "comment" => "web session storage",
1751 "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1752 "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1753 "data" => ["type" => "text", "comment" => ""],
1754 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1757 "PRIMARY" => ["id"],
1758 "sid" => ["sid(64)"],
1759 "expire" => ["expire"],
1763 "comment" => "Data stored by Database storage backend",
1765 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1766 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]
1773 "comment" => "Push Subscription for the API",
1775 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1776 "application-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["application" => "id"], "comment" => ""],
1777 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1778 "endpoint" => ["type" => "varchar(511)", "comment" => "Endpoint URL"],
1779 "pubkey" => ["type" => "varchar(127)", "comment" => "User agent public key"],
1780 "secret" => ["type" => "varchar(32)", "comment" => "Auth secret"],
1781 "follow" => ["type" => "boolean", "comment" => ""],
1782 "favourite" => ["type" => "boolean", "comment" => ""],
1783 "reblog" => ["type" => "boolean", "comment" => ""],
1784 "mention" => ["type" => "boolean", "comment" => ""],
1785 "poll" => ["type" => "boolean", "comment" => ""],
1786 "follow_request" => ["type" => "boolean", "comment" => ""],
1787 "status" => ["type" => "boolean", "comment" => ""],
1790 "PRIMARY" => ["id"],
1791 "application-id_uid" => ["UNIQUE", "application-id", "uid"],
1792 "uid_application-id" => ["uid", "application-id"],
1796 "comment" => "Deleted usernames",
1798 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1799 "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
1802 "PRIMARY" => ["id"],
1803 "username" => ["username(32)"],
1807 "comment" => "User specific public contact data",
1809 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
1810 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1811 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
1812 "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
1813 "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
1814 "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"],
1815 "hidden" => ["type" => "boolean", "comment" => "This contact is hidden from the others"],
1816 "is-blocked" => ["type" => "boolean", "comment" => "User is blocked by this contact"],
1817 "pending" => ["type" => "boolean", "comment" => ""],
1818 "rel" => ["type" => "tinyint unsigned", "comment" => "The kind of the relation between the user and the contact"],
1819 "info" => ["type" => "mediumtext", "comment" => ""],
1820 "notify_new_posts" => ["type" => "boolean", "comment" => ""],
1821 "remote_self" => ["type" => "boolean", "comment" => ""],
1822 "fetch_further_information" => ["type" => "tinyint unsigned", "comment" => ""],
1823 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
1824 "subhub" => ["type" => "boolean", "comment" => ""],
1825 "hub-verify" => ["type" => "varbinary(383)", "comment" => ""],
1826 "protocol" => ["type" => "char(4)", "comment" => "Protocol of the contact"],
1827 "rating" => ["type" => "tinyint", "comment" => "Automatically detected feed poll frequency"],
1828 "priority" => ["type" => "tinyint unsigned", "comment" => "Feed poll priority"],
1831 "PRIMARY" => ["uid", "cid"],
1833 "uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
1836 "arrived-activity" => [
1837 "comment" => "Id of arrived activities",
1839 "object-id" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "object id of the incoming activity"],
1840 "received" => ["type" => "datetime", "comment" => "Receiving date"],
1843 "PRIMARY" => ["object-id"],
1845 "engine" => "MEMORY",
1847 "fetched-activity" => [
1848 "comment" => "Id of fetched activities",
1850 "object-id" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "object id of fetched activity"],
1851 "received" => ["type" => "datetime", "comment" => "Receiving date"],
1854 "PRIMARY" => ["object-id"],
1856 "engine" => "MEMORY",
1859 "comment" => "Inter process communication between the frontend and the worker",
1861 "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
1862 "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
1865 "PRIMARY" => ["key"],
1867 "engine" => "MEMORY",