3 * @copyright Copyright (C) 2020, Friendica
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.
24 * Syntax (braces indicate optionale values):
26 * "comment" => "Description of the table",
29 * "type" => "<field type>{(<field size>)} <unsigned>",
31 * {"extra" => "auto_increment",}
32 * {"default" => "<default value>",}
33 * {"default" => NULL_DATE,} (for datetime fields)
35 * {"foreign|relation" => ["<foreign key table name>" => "<foreign key field name>"],}
36 * "comment" => "Description of the fields"
41 * "PRIMARY" => ["<primary key field name>", ...],
42 * "<index name>" => [{"UNIQUE",} "<field name>{(<key size>)}", ...]
47 * Whenever possible prefer "foreign" before "relation" with the foreign keys.
48 * "foreign" adds true foreign keys on the database level, while "relation" simulates this behaviour.
50 * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value below.
54 use Friendica\Database\DBA;
56 if (!defined('DB_UPDATE_VERSION')) {
57 define('DB_UPDATE_VERSION', 1348);
61 "2fa_app_specific_password" => [
62 "comment" => "Two-factor app-specific _password",
64 "id" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Password ID for revocation"],
65 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "relation" => ["user" => "uid"], "comment" => "User ID"],
66 "description" => ["type" => "varchar(255)", "comment" => "Description of the usage of the password"],
67 "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "comment" => "Hashed password"],
68 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the password was generated"],
69 "last_used" => ["type" => "datetime", "comment" => "Datetime the password was last used"],
73 "uid_description" => ["uid", "description(190)"],
76 "2fa_recovery_codes" => [
77 "comment" => "Two-factor authentication recovery codes",
79 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User ID"],
80 "code" => ["type" => "varchar(50)", "not null" => "1", "primary" => "1", "comment" => "Recovery code string"],
81 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the code was generated"],
82 "used" => ["type" => "datetime", "comment" => "Datetime the code was used"],
85 "PRIMARY" => ["uid", "code"]
89 "comment" => "registered addons",
91 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
92 "name" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "addon base (file)name"],
93 "version" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "currently unused"],
94 "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently always 1"],
95 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently unused"],
96 "timestamp" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "file timestamp to check for reloads"],
97 "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = has admin config, 0 = has no admin config"],
101 "name" => ["UNIQUE", "name"],
105 "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
107 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
108 "uuid" => ["type" => "varchar(255)", "comment" => ""],
109 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
110 "following" => ["type" => "varchar(255)", "comment" => ""],
111 "followers" => ["type" => "varchar(255)", "comment" => ""],
112 "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
113 "outbox" => ["type" => "varchar(255)", "comment" => ""],
114 "sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
115 "manually-approve" => ["type" => "boolean", "comment" => ""],
116 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
117 "name" => ["type" => "varchar(255)", "comment" => ""],
118 "about" => ["type" => "text", "comment" => ""],
119 "photo" => ["type" => "varchar(255)", "comment" => ""],
120 "addr" => ["type" => "varchar(255)", "comment" => ""],
121 "alias" => ["type" => "varchar(255)", "comment" => ""],
122 "pubkey" => ["type" => "text", "comment" => ""],
123 "baseurl" => ["type" => "varchar(255)", "comment" => "baseurl of the ap contact"],
124 "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
125 "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
126 "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
127 "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
128 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
131 "PRIMARY" => ["url"],
132 "addr" => ["addr(32)"],
133 "alias" => ["alias(190)"],
134 "url" => ["followers(190)"]
138 "comment" => "file attachments",
140 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
141 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
142 "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
143 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
144 "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
145 "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
146 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
147 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
148 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
149 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
150 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
151 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
152 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
153 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
154 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
161 "comment" => "OAuth usage",
163 "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
164 "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "foreign" => ["clients" => "client_id"],
166 "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
167 "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
168 "scope" => ["type" => "varchar(250)", "not null" => "1", "default" => "", "comment" => ""],
172 "client_id" => ["client_id"]
176 "comment" => "Stores temporary data",
178 "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
179 "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
180 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
181 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
185 "k_expires" => ["k", "expires"],
191 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
192 "challenge" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
193 "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
194 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
195 "type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
196 "last_update" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
203 "comment" => "OAuth usage",
205 "client_id" => ["type" => "varchar(20)", "not null" => "1", "primary" => "1", "comment" => ""],
206 "pw" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => ""],
207 "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
208 "name" => ["type" => "text", "comment" => ""],
209 "icon" => ["type" => "text", "comment" => ""],
210 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
213 "PRIMARY" => ["client_id"],
217 "comment" => "main configuration storage",
219 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
220 "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
221 "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
222 "v" => ["type" => "mediumtext", "comment" => ""],
226 "cat_k" => ["UNIQUE", "cat", "k"],
230 "comment" => "contact table",
232 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
233 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
234 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
235 "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"],
236 "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
237 "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
238 "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
239 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
240 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network of the contact"],
241 "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"],
242 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
243 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
244 "location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
245 "about" => ["type" => "text", "comment" => ""],
246 "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
247 "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
248 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
249 "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
250 "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
251 "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"],
252 "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
253 "micro" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
254 "site-pubkey" => ["type" => "text", "comment" => ""],
255 "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
256 "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
257 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
258 "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
259 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
260 "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
261 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
262 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
263 "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
264 "request" => ["type" => "varchar(255)", "comment" => ""],
265 "notify" => ["type" => "varchar(255)", "comment" => ""],
266 "poll" => ["type" => "varchar(255)", "comment" => ""],
267 "confirm" => ["type" => "varchar(255)", "comment" => ""],
268 "poco" => ["type" => "varchar(255)", "comment" => ""],
269 "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
270 "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
271 "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
272 "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
273 "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
274 "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
275 "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
276 "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
277 "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
278 "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
279 "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
280 "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
281 "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
282 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
283 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Node-wide block status"],
284 "block_reason" => ["type" => "text", "comment" => "Node-wide block reason"],
285 "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
286 "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
287 "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum"],
288 "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group"],
289 "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
290 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
291 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
292 "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
293 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
294 "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
295 "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"],
296 "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"],
297 "baseurl" => ["type" => "varchar(255)", "default" => "", "comment" => "baseurl of the contact"],
298 "reason" => ["type" => "text", "comment" => ""],
299 "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""],
300 "info" => ["type" => "mediumtext", "comment" => ""],
301 "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
302 "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
303 "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
304 "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
305 "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
306 "ffi_keyword_blacklist" => ["type" => "text", "comment" => ""],
310 "uid_name" => ["uid", "name(190)"],
311 "self_uid" => ["self", "uid"],
312 "alias_uid" => ["alias(32)", "uid"],
313 "pending_uid" => ["pending", "uid"],
314 "blocked_uid" => ["blocked", "uid"],
315 "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
316 "uid_network_batch" => ["uid", "network", "batch(64)"],
317 "addr_uid" => ["addr(32)", "uid"],
318 "nurl_uid" => ["nurl(32)", "uid"],
319 "nick_uid" => ["nick(32)", "uid"],
320 "dfrn-id" => ["dfrn-id(64)"],
321 "issued-id" => ["issued-id(64)"],
324 "contact-relation" => [
325 "comment" => "Contact relations",
327 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "primary" => "1", "comment" => "contact the related contact had interacted with"],
328 "relation-cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "primary" => "1", "comment" => "related contact who had interacted with the contact"],
329 "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction"],
332 "PRIMARY" => ["cid", "relation-cid"],
333 "relation-cid" => ["relation-cid"],
337 "comment" => "private messages",
339 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
340 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
341 "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
342 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
343 "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
344 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
345 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
346 "subject" => ["type" => "text", "comment" => "subject of initial message"],
354 "comment" => "Raw data and structure information for messages",
356 "item-uri" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "Original URI of the item - unrelated to the table with the same name"],
357 "reply-to-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "URI to which this item is a reply"],
358 "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation URI"],
359 "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation link"],
360 "protocol" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "255", "comment" => "The protocol of the item"],
361 "direction" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "How the message arrived here: 1=push, 2=pull"],
362 "source" => ["type" => "mediumtext", "comment" => "Original source"],
363 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Receiving date"],
366 "PRIMARY" => ["item-uri"],
367 "conversation-uri" => ["conversation-uri"],
368 "received" => ["received"],
371 "diaspora-interaction" => [
372 "comment" => "Signed Diaspora Interaction",
374 "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"],
375 "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
378 "PRIMARY" => ["uri-id"]
382 "comment" => "Events",
384 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
385 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
386 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
387 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
388 "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
389 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
390 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
391 "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
392 "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
393 "summary" => ["type" => "text", "comment" => "short description or title of the event"],
394 "desc" => ["type" => "text", "comment" => "event description"],
395 "location" => ["type" => "text", "comment" => "event location"],
396 "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
397 "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
398 "adjust" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "adjust to timezone of the recipient (0 or 1)"],
399 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
400 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
401 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
402 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
403 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
407 "uid_start" => ["uid", "start"],
411 "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
413 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
414 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "unique id"],
415 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
416 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
417 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
418 "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
419 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
420 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
421 "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
422 "notify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
423 "poll" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
424 "confirm" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
425 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
426 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
427 "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
428 "pubkey" => ["type" => "text", "comment" => ""],
429 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
433 "addr" => ["addr(32)"],
434 "url" => ["UNIQUE", "url(190)"],
438 "comment" => "friend suggestion stuff",
440 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
441 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
442 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
443 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
444 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
445 "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
446 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
447 "note" => ["type" => "text", "comment" => ""],
448 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
455 "comment" => "contacts ignored by friend suggestions",
457 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
458 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Local User id"],
459 "gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => "gcontact.id of ignored contact"],
468 "comment" => "global contacts",
470 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
471 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
472 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
473 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Link to the contacts profile page"],
474 "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
475 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Link to the profile photo"],
476 "connect" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
477 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
478 "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
479 "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
480 "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
481 "last_discovery" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last contact discovery"],
482 "archive_date" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
483 "archived" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
484 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
485 "about" => ["type" => "text", "comment" => ""],
486 "keywords" => ["type" => "text", "comment" => "puplic keywords (interests)"],
487 "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
488 "birthday" => ["type" => "varchar(32)", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
489 "community" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if contact is forum account"],
490 "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "-1", "comment" => ""],
491 "hide" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = should be hidden from search"],
492 "nsfw" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = contact posts nsfw content"],
493 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "social network protocol"],
494 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
495 "notify" => ["type" => "varchar(255)", "comment" => ""],
496 "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
497 "generation" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
498 "server_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "baseurl of the contacts server"],
502 "nurl" => ["UNIQUE", "nurl(190)"],
503 "name" => ["name(64)"],
504 "nick" => ["nick(32)"],
505 "addr" => ["addr(64)"],
506 "hide_network_updated" => ["hide", "network", "updated"],
507 "updated" => ["updated"],
511 "comment" => "Followers of global contacts",
513 "gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["gcontact" => "id"], "comment" => "global contact"],
514 "follower-gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["gcontact" => "id"], "comment" => "global contact of the follower"],
515 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates that the connection has been deleted"],
518 "PRIMARY" => ["gcid", "follower-gcid"],
519 "follower-gcid" => ["follower-gcid"],
523 "comment" => "'friends of friends' linkages derived from poco",
525 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
526 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
527 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
528 "gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
529 "zcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
530 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
534 "cid_uid_gcid_zcid" => ["UNIQUE", "cid", "uid", "gcid", "zcid"],
539 "comment" => "privacy groups, group info",
541 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
542 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
543 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
544 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
545 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
553 "comment" => "privacy groups, member info",
555 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
556 "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["group" => "id"], "comment" => "groups.id of the associated group"],
557 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
561 "contactid" => ["contact-id"],
562 "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
566 "comment" => "Global servers",
568 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
569 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
570 "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
571 "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
572 "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
573 "info" => ["type" => "text", "comment" => ""],
574 "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
575 "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
576 "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
577 "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
578 "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
579 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
580 "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
581 "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
582 "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
583 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
584 "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
585 "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
586 "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
590 "nurl" => ["UNIQUE", "nurl(190)"],
594 "comment" => "Tags that the server has subscribed",
596 "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gserver" => "id"], "primary" => "1",
597 "comment" => "The id of the gserver"],
598 "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
601 "PRIMARY" => ["gserver-id", "tag"],
606 "comment" => "addon hook registry",
608 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
609 "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
610 "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
611 "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
612 "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"],
616 "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
620 "comment" => "Status of ActivityPub inboxes",
622 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
623 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
624 "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
625 "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
626 "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
627 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
628 "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
637 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
638 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
639 "fid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["fcontact" => "id"], "comment" => ""],
640 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
641 "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
642 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
643 "note" => ["type" => "text", "comment" => ""],
644 "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
645 "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
646 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
647 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
654 "comment" => "Structure for all posts",
656 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
657 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this item"],
658 "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
659 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
660 "uri-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
661 "parent" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => "item.id of the parent to this item if it is a reply of some form; otherwise this must be set to the id of this item"],
662 "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "uri of the parent to this item"],
663 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
664 "thr-parent" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "If the parent of this item is not the top-level item in the conversation, the uri of the immediate parent; otherwise set to parent-uri"],
665 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
666 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
667 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
668 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last comment/reply to this item"],
669 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
670 "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"],
671 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
672 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
673 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the owner of this item"],
674 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the author of this item"],
675 "icid" => ["type" => "int unsigned", "relation" => ["item-content" => "id"], "comment" => "Id of the item-content table entry that contains the whole item content"],
676 "iaid" => ["type" => "int unsigned", "relation" => ["item-activity" => "id"], "comment" => "Id of the item-activity table entry that contains the activity data"],
677 "vid" => ["type" => "smallint unsigned", "relation" => ["verb" => "id"], "comment" => "Id of the verb table entry that contains the activity verbs"],
678 "extid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
679 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"],
680 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
681 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
682 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
683 "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
684 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been deleted"],
685 // User specific fields. Eventually they will move to user-item
686 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
687 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
688 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
689 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
690 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
691 "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been favourited"],
692 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "item has not been seen"],
693 "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The owner of this item was mentioned in it"],
694 "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
695 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
696 // It has to be decided whether these fields belong to the user or the structure
697 "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"],
698 "event-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["event" => "id"], "comment" => "Used to link to the event.id"],
699 // Could possibly be replaced by the "attach" table?
700 "attach" => ["type" => "mediumtext", "comment" => "JSON structure representing attachments to this item"],
701 // Deprecated fields. Will be removed in upcoming versions
702 "allow_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
703 "allow_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
704 "deny_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
705 "deny_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
706 "postopts" => ["type" => "text", "comment" => "Deprecated"],
707 "inform" => ["type" => "mediumtext", "comment" => "Deprecated"],
708 "type" => ["type" => "varchar(20)", "comment" => "Deprecated"],
709 "bookmark" => ["type" => "boolean", "comment" => "Deprecated"],
710 "file" => ["type" => "mediumtext", "comment" => "Deprecated"],
711 "location" => ["type" => "varchar(255)", "comment" => "Deprecated"],
712 "coord" => ["type" => "varchar(255)", "comment" => "Deprecated"],
713 "tag" => ["type" => "mediumtext", "comment" => "Deprecated"],
714 "plink" => ["type" => "varchar(255)", "comment" => "Deprecated"],
715 "title" => ["type" => "varchar(255)", "comment" => "Deprecated"],
716 "content-warning" => ["type" => "varchar(255)", "comment" => "Deprecated"],
717 "body" => ["type" => "mediumtext", "comment" => "Deprecated"],
718 "app" => ["type" => "varchar(255)", "comment" => "Deprecated"],
719 "verb" => ["type" => "varchar(100)", "comment" => "Deprecated"],
720 "object-type" => ["type" => "varchar(100)", "comment" => "Deprecated"],
721 "object" => ["type" => "text", "comment" => "Deprecated"],
722 "target-type" => ["type" => "varchar(100)", "comment" => "Deprecated"],
723 "target" => ["type" => "text", "comment" => "Deprecated"],
724 "author-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
725 "author-link" => ["type" => "varchar(255)", "comment" => "Deprecated"],
726 "author-avatar" => ["type" => "varchar(255)", "comment" => "Deprecated"],
727 "owner-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
728 "owner-link" => ["type" => "varchar(255)", "comment" => "Deprecated"],
729 "owner-avatar" => ["type" => "varchar(255)", "comment" => "Deprecated"],
730 "rendered-hash" => ["type" => "varchar(32)", "comment" => "Deprecated"],
731 "rendered-html" => ["type" => "mediumtext", "comment" => "Deprecated"],
735 "guid" => ["guid(191)"],
736 "uri" => ["uri(191)"],
737 "parent" => ["parent"],
738 "parent-uri" => ["parent-uri(191)"],
739 "extid" => ["extid(191)"],
740 "uid_id" => ["uid", "id"],
741 "uid_contactid_id" => ["uid", "contact-id", "id"],
742 "uid_received" => ["uid", "received"],
743 "uid_commented" => ["uid", "commented"],
744 "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
745 "uid_network_received" => ["uid", "network", "received"],
746 "uid_network_commented" => ["uid", "network", "commented"],
747 "uid_thrparent" => ["uid", "thr-parent(190)"],
748 "uid_parenturi" => ["uid", "parent-uri(190)"],
749 "uid_contactid_received" => ["uid", "contact-id", "received"],
750 "authorid_received" => ["author-id", "received"],
751 "ownerid" => ["owner-id"],
752 "contact-id" => ["contact-id"],
753 "uid_uri" => ["uid", "uri(190)"],
754 "resource-id" => ["resource-id"],
755 "deleted_changed" => ["deleted", "changed"],
756 "uid_wall_changed" => ["uid", "wall", "changed"],
757 "mention_uid_id" => ["mention", "uid", "id"],
758 "uid_eventid" => ["uid", "event-id"],
761 "psid_wall" => ["psid", "wall"],
762 "uri-id" => ["uri-id"],
763 "parent-uri-id" => ["parent-uri-id"],
764 "thr-parent-id" => ["thr-parent-id"],
768 "comment" => "Activities for items",
770 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
771 "uri" => ["type" => "varchar(255)", "comment" => ""],
772 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
773 "uri-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
774 "activity" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""]
778 "uri-hash" => ["UNIQUE", "uri-hash"],
779 "uri" => ["uri(191)"],
780 "uri-id" => ["uri-id"]
784 "comment" => "Content for all posts",
786 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
787 "uri" => ["type" => "varchar(255)", "comment" => ""],
788 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
789 "uri-plink-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
790 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
791 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
792 "body" => ["type" => "mediumtext", "comment" => "item body content"],
793 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
794 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
795 "language" => ["type" => "text", "comment" => "Language information about this post"],
796 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
797 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
798 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
799 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
800 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
801 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
802 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
803 "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"],
804 "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams verb"]
808 "uri-plink-hash" => ["UNIQUE", "uri-plink-hash"],
809 "uri" => ["uri(191)"],
810 "plink" => ["plink(191)"],
811 "uri-id" => ["uri-id"]
815 "comment" => "URI and GUID for items",
817 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
818 "uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
819 "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
823 "uri" => ["UNIQUE", "uri"],
830 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
831 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
832 "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
833 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
834 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
838 "name_expires" => ["name", "expires"]
842 "comment" => "private messages",
844 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
845 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
846 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
847 "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
848 "from-photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
849 "from-url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
850 "contact-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "relation" => ["contact" => "id"], "comment" => "contact.id"],
851 "convid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["conv" => "id"], "comment" => "conv.id"],
852 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
853 "body" => ["type" => "mediumtext", "comment" => ""],
854 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
855 "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
856 "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
857 "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
858 "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
859 "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
860 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
864 "uid_seen" => ["uid", "seen"],
865 "convid" => ["convid"],
866 "uri" => ["uri(64)"],
867 "parent-uri" => ["parent-uri(64)"],
868 "contactid" => ["contact-id(32)"],
872 "comment" => "Mail account data for fetching mails",
874 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
875 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
876 "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
877 "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
878 "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
879 "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
880 "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
881 "pass" => ["type" => "text", "comment" => ""],
882 "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
883 "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
884 "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
885 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
886 "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
893 "comment" => "table of accounts that can manage each other",
895 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
896 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
897 "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
901 "uid_mid" => ["UNIQUE", "uid", "mid"],
905 "comment" => "notifications",
907 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
908 "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
909 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
910 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
911 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
912 "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
913 "msg" => ["type" => "mediumtext", "comment" => ""],
914 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
915 "link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
916 "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => "item.id"],
917 "parent" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
918 "uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
919 "parent-uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
920 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
921 "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
922 "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
923 "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
924 "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
928 "seen_uid_date" => ["seen", "uid", "date"],
929 "uid_date" => ["uid", "date"],
930 "uid_type_link" => ["uid", "type", "link(190)"],
933 "notify-threads" => [
936 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
937 "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["notify" => "id"], "comment" => ""],
938 "master-parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
939 "master-parent-uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
940 "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
941 "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"],
942 "comment" => "User id"],
946 "master-parent-uri-id" => ["master-parent-uri-id"],
950 "comment" => "cache for OEmbed queries",
952 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
953 "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
954 "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
955 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
958 "PRIMARY" => ["url", "maxwidth"],
959 "created" => ["created"],
962 "openwebauth-token" => [
963 "comment" => "Store OpenWebAuth token to verify contacts",
965 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
966 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
967 "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
968 "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
969 "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
970 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
977 "comment" => "cache for 'parse_url' queries",
979 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
980 "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
981 "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
982 "content" => ["type" => "mediumtext", "comment" => "page data"],
983 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
986 "PRIMARY" => ["url", "guessing", "oembed"],
987 "created" => ["created"],
991 "comment" => "Storage for participation messages from Diaspora",
993 "iid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "relation" => ["item" => "id"], "comment" => ""],
994 "server" => ["type" => "varchar(60)", "not null" => "1", "primary" => "1", "comment" => ""],
995 "cid" => ["type" => "int unsigned", "not null" => "1", "relation" => ["contact" => "id"], "comment" => ""],
996 "fid" => ["type" => "int unsigned", "not null" => "1", "relation" => ["fcontact" => "id"], "comment" => ""],
999 "PRIMARY" => ["iid", "server"],
1005 "comment" => "personal (per user) configuration storage",
1007 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
1008 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
1009 "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
1010 "k" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => ""],
1011 "v" => ["type" => "mediumtext", "comment" => ""],
1014 "PRIMARY" => ["id"],
1015 "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
1018 "permissionset" => [
1021 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1022 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
1023 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
1024 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
1025 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
1026 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
1029 "PRIMARY" => ["id"],
1030 "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
1034 "comment" => "photo storage",
1036 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1037 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
1038 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
1039 "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
1040 "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
1041 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
1042 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
1043 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1044 "desc" => ["type" => "text", "comment" => ""],
1045 "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
1046 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1047 "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
1048 "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1049 "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1050 "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1051 "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
1052 "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1053 "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1054 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
1055 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
1056 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
1057 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
1058 "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"],
1059 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
1060 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
1061 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1064 "PRIMARY" => ["id"],
1065 "contactid" => ["contact-id"],
1066 "uid_contactid" => ["uid", "contact-id"],
1067 "uid_profile" => ["uid", "profile"],
1068 "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
1069 "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
1070 "resource-id" => ["resource-id"],
1074 "comment" => "Currently unused table for storing poll results",
1076 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
1077 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
1078 "q0" => ["type" => "text", "comment" => ""],
1079 "q1" => ["type" => "text", "comment" => ""],
1080 "q2" => ["type" => "text", "comment" => ""],
1081 "q3" => ["type" => "text", "comment" => ""],
1082 "q4" => ["type" => "text", "comment" => ""],
1083 "q5" => ["type" => "text", "comment" => ""],
1084 "q6" => ["type" => "text", "comment" => ""],
1085 "q7" => ["type" => "text", "comment" => ""],
1086 "q8" => ["type" => "text", "comment" => ""],
1087 "q9" => ["type" => "text", "comment" => ""],
1090 "PRIMARY" => ["id"],
1095 "comment" => "data for polls - currently unused",
1097 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1098 "poll_id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["poll" => "id"]],
1099 "choice" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1102 "PRIMARY" => ["id"],
1103 "poll_id" => ["poll_id"],
1107 "comment" => "Currently running system processes",
1109 "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => ""],
1110 "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
1111 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1114 "PRIMARY" => ["pid"],
1115 "command" => ["command"],
1119 "comment" => "user profiles data",
1121 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1122 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
1123 "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1124 "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
1125 "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
1126 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1127 "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1128 "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
1129 "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1130 "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1131 "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1132 "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1133 "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1134 "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1135 "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
1136 "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1137 "with" => ["type" => "text", "comment" => "Deprecated"],
1138 "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
1139 "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1140 "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1141 "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1142 "pub_keywords" => ["type" => "text", "comment" => ""],
1143 "prv_keywords" => ["type" => "text", "comment" => ""],
1144 "likes" => ["type" => "text", "comment" => "Deprecated"],
1145 "dislikes" => ["type" => "text", "comment" => "Deprecated"],
1146 "about" => ["type" => "text", "comment" => "Profile description"],
1147 "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1148 "music" => ["type" => "text", "comment" => "Deprecated"],
1149 "book" => ["type" => "text", "comment" => "Deprecated"],
1150 "tv" => ["type" => "text", "comment" => "Deprecated"],
1151 "film" => ["type" => "text", "comment" => "Deprecated"],
1152 "interest" => ["type" => "text", "comment" => "Deprecated"],
1153 "romance" => ["type" => "text", "comment" => "Deprecated"],
1154 "work" => ["type" => "text", "comment" => "Deprecated"],
1155 "education" => ["type" => "text", "comment" => "Deprecated"],
1156 "contact" => ["type" => "text", "comment" => "Deprecated"],
1157 "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1158 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1159 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1160 "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1161 "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
1162 "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
1165 "PRIMARY" => ["id"],
1166 "uid_is-default" => ["uid", "is-default"],
1167 "pub_keywords" => ["FULLTEXT", "pub_keywords"],
1170 "profile_check" => [
1171 "comment" => "DFRN remote auth use",
1173 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1174 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
1175 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
1176 "dfrn_id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1177 "sec" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1178 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1181 "PRIMARY" => ["id"],
1184 "profile_field" => [
1185 "comment" => "Custom profile fields",
1187 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1188 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner user id"],
1189 "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
1190 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this profile field - 0 = public"],
1191 "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
1192 "value" => ["type" => "text", "comment" => "Value of the field"],
1193 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
1194 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
1197 "PRIMARY" => ["id"],
1199 "order" => ["order"],
1203 "push_subscriber" => [
1204 "comment" => "Used for OStatus: Contains feed subscribers",
1206 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1207 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
1208 "callback_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1209 "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1210 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1211 "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1212 "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
1213 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1214 "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
1215 "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1218 "PRIMARY" => ["id"],
1219 "next_try" => ["next_try"],
1223 "comment" => "registrations requiring admin approval",
1225 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1226 "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1227 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1228 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
1229 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1230 "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1231 "note" => ["type" => "text", "comment" => ""],
1234 "PRIMARY" => ["id"],
1240 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1241 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
1242 "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1245 "PRIMARY" => ["id"],
1250 "comment" => "web session storage",
1252 "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1253 "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1254 "data" => ["type" => "text", "comment" => ""],
1255 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1258 "PRIMARY" => ["id"],
1259 "sid" => ["sid(64)"],
1260 "expire" => ["expire"],
1264 "comment" => "item taxonomy (categories, tags, etc.) table",
1266 "tid" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
1267 "oid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
1268 "otype" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1269 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1270 "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1271 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1272 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1273 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1274 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1275 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1276 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
1279 "PRIMARY" => ["tid"],
1280 "term_type" => ["term(64)", "type"],
1281 "oid_otype_type_term" => ["oid", "otype", "type", "term(32)"],
1282 "uid_otype_type_term_global_created" => ["uid", "otype", "type", "term(32)", "global", "created"],
1283 "uid_otype_type_url" => ["uid", "otype", "type", "url(64)"],
1284 "guid" => ["guid(64)"],
1288 "comment" => "tags and mentions",
1290 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
1291 "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
1292 "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""]
1295 "PRIMARY" => ["id"],
1296 "type_name_url" => ["UNIQUE", "name", "url"],
1300 "post-category" => [
1301 "comment" => "post relation to categories",
1303 "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"],
1304 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User id"],
1305 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1306 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1309 "PRIMARY" => ["uri-id", "uid", "type", "tid"],
1313 "post-delivery-data" => [
1314 "comment" => "Delivery data for items",
1316 "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"],
1317 "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"],
1318 "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
1319 "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
1320 "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
1321 "queue_failed" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of unsuccessful deliveries, used as item.delivery_queue_failed"],
1322 "activitypub" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via ActivityPub"],
1323 "dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via DFRN"],
1324 "legacy_dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via legacy DFRN"],
1325 "diaspora" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via Diaspora"],
1326 "ostatus" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via OStatus"],
1329 "PRIMARY" => ["uri-id"],
1333 "comment" => "post relation to tags",
1335 "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"],
1336 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1337 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1338 "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"],
1341 "PRIMARY" => ["uri-id", "type", "tid", "cid"],
1347 "comment" => "Thread related data",
1349 "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["item" => "id"],
1350 "comment" => "sequential ID"],
1351 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
1352 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
1353 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Item owner"],
1354 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Item author"],
1355 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1356 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1357 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1358 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1359 "changed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1360 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1361 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1362 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1363 "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1364 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1365 "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1366 "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1367 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"],
1368 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
1369 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1370 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1371 "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1372 "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1373 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1374 "bookmark" => ["type" => "boolean", "comment" => ""],
1377 "PRIMARY" => ["iid"],
1378 "uid_network_commented" => ["uid", "network", "commented"],
1379 "uid_network_received" => ["uid", "network", "received"],
1380 "uid_contactid_commented" => ["uid", "contact-id", "commented"],
1381 "uid_contactid_received" => ["uid", "contact-id", "received"],
1382 "contactid" => ["contact-id"],
1383 "ownerid" => ["owner-id"],
1384 "authorid" => ["author-id"],
1385 "uid_received" => ["uid", "received"],
1386 "uid_commented" => ["uid", "commented"],
1387 "uid_wall_received" => ["uid", "wall", "received"],
1388 "private_wall_origin_commented" => ["private", "wall", "origin", "commented"],
1392 "comment" => "OAuth usage",
1394 "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
1395 "secret" => ["type" => "text", "comment" => ""],
1396 "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "foreign" => ["clients" => "client_id"]],
1397 "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
1398 "scope" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
1399 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
1402 "PRIMARY" => ["id"],
1403 "client_id" => ["client_id"]
1407 "comment" => "The local users",
1409 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1410 "parent-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"],
1411 "comment" => "The parent user that has full control about this user"],
1412 "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
1413 "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
1414 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
1415 "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
1416 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
1417 "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
1418 "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1419 "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
1420 "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
1421 "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
1422 "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
1423 "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
1424 "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
1425 "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
1426 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
1427 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
1428 "spubkey" => ["type" => "text", "comment" => ""],
1429 "sprvkey" => ["type" => "text", "comment" => ""],
1430 "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
1431 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
1432 "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
1433 "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
1434 "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
1435 "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
1436 "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
1437 "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
1438 "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
1439 "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1440 "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1441 "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
1442 "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
1443 "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
1444 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1445 "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
1446 "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1447 "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
1448 "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
1449 "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1450 "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
1451 "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
1452 "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
1453 "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
1454 "openidserver" => ["type" => "text", "comment" => ""],
1457 "PRIMARY" => ["uid"],
1458 "nickname" => ["nickname(32)"],
1462 "comment" => "Deleted usernames",
1464 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1465 "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
1468 "PRIMARY" => ["id"],
1469 "username" => ["username(32)"],
1473 "comment" => "User specific public contact data",
1475 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
1476 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User id"],
1477 "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
1478 "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
1479 "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"]
1482 "PRIMARY" => ["uid", "cid"]
1486 "comment" => "User specific item data",
1488 "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["item" => "id"], "comment" => "Item id"],
1489 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User id"],
1490 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide an item from the user"],
1491 "ignored" => ["type" => "boolean", "comment" => "Ignore this thread if set"],
1492 "pinned" => ["type" => "boolean", "comment" => "The item is pinned on the profile page"],
1493 "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1496 "PRIMARY" => ["uid", "iid"],
1497 "uid_pinned" => ["uid", "pinned"],
1498 "iid_uid" => ["iid", "uid"]
1502 "comment" => "Activity Verbs",
1504 "id" => ["type" => "smallint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
1505 "name" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""]
1512 "comment" => "Inter process communication between the frontend and the worker",
1514 "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
1515 "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
1518 "PRIMARY" => ["key"],
1520 "engine" => "MEMORY",
1523 "comment" => "Background tasks queue entries",
1525 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
1526 "parameter" => ["type" => "mediumtext", "comment" => "Task command"],
1527 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
1528 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
1529 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
1530 "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
1531 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1532 "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1533 "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
1536 "PRIMARY" => ["id"],
1537 "done_parameter" => ["done", "parameter(64)"],
1538 "done_executed" => ["done", "executed"],
1539 "done_priority_created" => ["done", "priority", "created"],
1540 "done_priority_next_try" => ["done", "priority", "next_try"],
1541 "done_pid_next_try" => ["done", "pid", "next_try"],
1542 "done_pid_priority_created" => ["done", "pid", "priority", "created"]
1546 "comment" => "Data stored by Database storage backend",
1548 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1549 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]