]> git.mxchange.org Git - friendica.git/blob - static/dbstructure.config.php
Avoid warning " Undefined variable $browsershare"
[friendica.git] / static / dbstructure.config.php
1 <?php
2 /**
3  * @copyright Copyright (C) 2010-2022, the Friendica project
4  *
5  * @license GNU AGPL version 3 or any later version
6  *
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.
11  *
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.
16  *
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/>.
19  *
20  * Main database structure configuration file.
21  *
22  * Here are described all the tables, fields and indexes Friendica needs to work.
23  * The entry order is mostly alphabetic - with the exception of tables that are used in foreign keys.
24  *
25  * Syntax (braces indicate optionale values):
26  * "<table name>" => [
27  *      "comment" => "Description of the table",
28  *      "fields" => [
29  *              "<field name>" => [
30  *                      "type" => "<field type>{(<field size>)} <unsigned>",
31  *                      "not null" => 0|1,
32  *                      {"extra" => "auto_increment",}
33  *                      {"default" => "<default value>",}
34  *                      {"default" => NULL_DATE,} (for datetime fields)
35  *                      {"primary" => "1",}
36  *                      {"foreign|relation" => ["<foreign key table name>" => "<foreign key field name>"],}
37  *                      "comment" => "Description of the fields"
38  *              ],
39  *              ...
40  *      ],
41  *      "indexes" => [
42  *              "PRIMARY" => ["<primary key field name>", ...],
43  *              "<index name>" => [{"UNIQUE",} "<field name>{(<key size>)}", ...]
44  *              ...
45  *      ],
46  * ],
47  *
48  * Whenever possible prefer "foreign" before "relation" with the foreign keys.
49  * "foreign" adds true foreign keys on the database level, while "relation" is just an indicator of a table relation without any consequences
50  *
51  * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value below.
52  *
53  */
54
55 use Friendica\Database\DBA;
56
57 if (!defined('DB_UPDATE_VERSION')) {
58         define('DB_UPDATE_VERSION', 1458);
59 }
60
61 return [
62         // Side tables
63         "gserver" => [
64                 "comment" => "Global servers",
65                 "fields" => [
66                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
67                         "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
68                         "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
69                         "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
70                         "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
71                         "info" => ["type" => "text", "comment" => ""],
72                         "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
73                         "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
74                         "active-week-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last week"],
75                         "active-month-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last month"],
76                         "active-halfyear-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last six month"],
77                         "local-posts" => ["type" => "int unsigned", "comment" => "Number of local posts"],
78                         "local-comments" => ["type" => "int unsigned", "comment" => "Number of local comments"],
79                         "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
80                         "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
81                         "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
82                         "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
83                         "protocol" => ["type" => "tinyint unsigned", "comment" => "The protocol of the server"],
84                         "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
85                         "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
86                         "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
87                         "detection-method" => ["type" => "tinyint unsigned", "comment" => "Method that had been used to detect that server"],
88                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
89                         "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
90                         "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last successful connection request"],
91                         "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last failed connection request"],
92                         "failed" => ["type" => "boolean", "comment" => "Connection failed"],
93                         "next_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Next connection request"],
94                 ],
95                 "indexes" => [
96                         "PRIMARY" => ["id"],
97                         "nurl" => ["UNIQUE", "nurl(190)"],
98                         "next_contact" => ["next_contact"],
99                         "network" => ["network"],
100                 ]
101         ],
102         "user" => [
103                 "comment" => "The local users",
104                 "fields" => [
105                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
106                         "parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "The parent user that has full control about this user"],
107                         "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
108                         "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
109                         "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
110                         "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
111                         "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
112                         "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
113                         "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
114                         "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
115                         "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
116                         "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
117                         "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
118                         "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
119                         "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
120                         "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
121                         "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
122                         "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
123                         "spubkey" => ["type" => "text", "comment" => ""],
124                         "sprvkey" => ["type" => "text", "comment" => ""],
125                         "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
126                         "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
127                         "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
128                         "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
129                         "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
130                         "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
131                         "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
132                         "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
133                         "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
134                         "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
135                         "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
136                         "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
137                         "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
138                         "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
139                         "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
140                         "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
141                         "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
142                         "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
143                         "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
144                         "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
145                         "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
146                         "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
147                         "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
148                         "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
149                         "openidserver" => ["type" => "text", "comment" => ""],
150                 ],
151                 "indexes" => [
152                         "PRIMARY" => ["uid"],
153                         "nickname" => ["nickname(32)"],
154                         "parent-uid" => ["parent-uid"],
155                         "guid" => ["guid"],
156                         "email" => ["email(64)"],
157                 ]
158         ],
159         "item-uri" => [
160                 "comment" => "URI and GUID for items",
161                 "fields" => [
162                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
163                         "uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
164                         "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
165                 ],
166                 "indexes" => [
167                         "PRIMARY" => ["id"],
168                         "uri" => ["UNIQUE", "uri"],
169                         "guid" => ["guid"]
170                 ]
171         ],
172         "contact" => [
173                 "comment" => "contact table",
174                 "fields" => [
175                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
176                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
177                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
178                         "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"],
179                         "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network of the contact"],
180                         "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
181                         "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
182                         "location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
183                         "about" => ["type" => "text", "comment" => ""],
184                         "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
185                         "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
186                         "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
187                         "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
188                         "header" => ["type" => "varchar(255)", "comment" => "Header picture"],
189                         "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
190                         "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
191                         "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
192                         "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
193                         "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
194                         "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
195                         "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
196                         "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
197                         "notify" => ["type" => "varchar(255)", "comment" => ""],
198                         "poll" => ["type" => "varchar(255)", "comment" => ""],
199                         "subscribe" => ["type" => "varchar(255)", "comment" => ""],
200                         "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
201                         "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
202                         "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
203                         "failed" => ["type" => "boolean", "comment" => "Connection failed"],
204                         "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
205                         "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
206                         "last-discovery" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last follower discovery"],
207                         "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Node-wide block status"],
208                         "block_reason" => ["type" => "text", "comment" => "Node-wide block reason"],
209                         "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
210                         "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Person, organisation, news, community, relay"],
211                         "manually-approve" => ["type" => "boolean", "comment" => "Contact requests have to be approved manually"],
212                         "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
213                         "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"],
214                         "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"],
215                         "baseurl" => ["type" => "varchar(255)", "default" => "", "comment" => "baseurl of the contact"],
216                         "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
217                         "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
218                         // User depending fields
219                         "reason" => ["type" => "text", "comment" => ""],
220                         "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
221                         "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
222                         "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
223                         "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"],
224                         "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
225                         "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
226                         "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Automatically detected feed poll frequency"],
227                         "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Feed poll priority"],
228                         "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
229                         "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
230                         "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Contact request is pending"],
231                         "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
232                         "info" => ["type" => "mediumtext", "comment" => ""],
233                         "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
234                         "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
235                         "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
236                         // Deprecated, but still in use
237                         "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"],
238                         "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
239                         "micro" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
240                         "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
241                         "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
242                         "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
243                         "request" => ["type" => "varchar(255)", "comment" => ""],
244                         "confirm" => ["type" => "varchar(255)", "comment" => ""],
245                         "poco" => ["type" => "varchar(255)", "comment" => ""],
246                         "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
247                         "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = false instead"],
248                         "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = true instead"],
249                         "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
250                         // Deprecated fields that aren't in use anymore
251                         "site-pubkey" => ["type" => "text", "comment" => "Deprecated"],
252                         "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
253                         "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
254                         "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
255                         "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
256                         "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
257                         "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
258                         "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
259                         "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => "Deprecated"],
260                         "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
261                 ],
262                 "indexes" => [
263                         "PRIMARY" => ["id"],
264                         "uid_name" => ["uid", "name(190)"],
265                         "self_uid" => ["self", "uid"],
266                         "alias_uid" => ["alias(128)", "uid"],
267                         "pending_uid" => ["pending", "uid"],
268                         "blocked_uid" => ["blocked", "uid"],
269                         "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
270                         "uid_network_batch" => ["uid", "network", "batch(64)"],
271                         "batch_contact-type" => ["batch(64)", "contact-type"],
272                         "addr_uid" => ["addr(128)", "uid"],
273                         "nurl_uid" => ["nurl(128)", "uid"],
274                         "nick_uid" => ["nick(128)", "uid"],
275                         "attag_uid" => ["attag(96)", "uid"],
276                         "network_uid_lastupdate" => ["network", "uid", "last-update"],
277                         "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
278                         "uid_lastitem" => ["uid", "last-item"],
279                         "baseurl" => ["baseurl(64)"],
280                         "uid_contact-type" => ["uid", "contact-type"],
281                         "uid_self_contact-type" => ["uid", "self", "contact-type"],
282                         "self_network_uid" => ["self", "network", "uid"],
283                         "gsid" => ["gsid"],
284                         "uri-id" => ["uri-id"],
285                 ]
286         ],
287         "tag" => [
288                 "comment" => "tags and mentions",
289                 "fields" => [
290                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
291                         "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
292                         "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""]
293                 ],
294                 "indexes" => [
295                         "PRIMARY" => ["id"],
296                         "type_name_url" => ["UNIQUE", "name", "url"],
297                         "url" => ["url"]
298                 ]
299         ],
300         "permissionset" => [
301                 "comment" => "",
302                 "fields" => [
303                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
304                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
305                         "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
306                         "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
307                         "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
308                         "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
309                 ],
310                 "indexes" => [
311                         "PRIMARY" => ["id"],
312                         "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["uid", "allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
313                 ]
314         ],
315         "verb" => [
316                 "comment" => "Activity Verbs",
317                 "fields" => [
318                         "id" => ["type" => "smallint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
319                         "name" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""]
320                 ],
321                 "indexes" => [
322                         "PRIMARY" => ["id"],
323                         "name" => ["name"]
324                 ]
325         ],
326         // Main tables
327         "2fa_app_specific_password" => [
328                 "comment" => "Two-factor app-specific _password",
329                 "fields" => [
330                         "id" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Password ID for revocation"],
331                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
332                         "description" => ["type" => "varchar(255)", "comment" => "Description of the usage of the password"],
333                         "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "comment" => "Hashed password"],
334                         "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the password was generated"],
335                         "last_used" => ["type" => "datetime", "comment" => "Datetime the password was last used"],
336                 ],
337                 "indexes" => [
338                         "PRIMARY" => ["id"],
339                         "uid_description" => ["uid", "description(190)"],
340                 ]
341         ],
342         "2fa_recovery_codes" => [
343                 "comment" => "Two-factor authentication recovery codes",
344                 "fields" => [
345                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
346                         "code" => ["type" => "varchar(50)", "not null" => "1", "primary" => "1", "comment" => "Recovery code string"],
347                         "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the code was generated"],
348                         "used" => ["type" => "datetime", "comment" => "Datetime the code was used"],
349                 ],
350                 "indexes" => [
351                         "PRIMARY" => ["uid", "code"]
352                 ]
353         ],
354         "2fa_trusted_browser" => [
355                 "comment" => "Two-factor authentication trusted browsers",
356                 "fields" => [
357                         "cookie_hash" => ["type" => "varchar(80)", "not null" => "1", "primary" => "1", "comment" => "Trusted cookie hash"],
358                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
359                         "user_agent" => ["type" => "text", "comment" => "User agent string"],
360                         "created" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the trusted browser was recorded"],
361                         "last_used" => ["type" => "datetime", "comment" => "Datetime the trusted browser was last used"],
362                 ],
363                 "indexes" => [
364                         "PRIMARY" => ["cookie_hash"],
365                         "uid" => ["uid"],
366                 ]
367         ],
368         "addon" => [
369                 "comment" => "registered addons",
370                 "fields" => [
371                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
372                         "name" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "addon base (file)name"],
373                         "version" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "currently unused"],
374                         "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently always 1"],
375                         "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently unused"],
376                         "timestamp" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "file timestamp to check for reloads"],
377                         "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = has admin config, 0 = has no admin config"],
378                 ],
379                 "indexes" => [
380                         "PRIMARY" => ["id"],
381                         "installed_name" => ["installed", "name"],
382                         "name" => ["UNIQUE", "name"],
383                 ]
384         ],
385         "apcontact" => [
386                 "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
387                 "fields" => [
388                         "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
389                         "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
390                         "uuid" => ["type" => "varchar(255)", "comment" => ""],
391                         "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
392                         "following" => ["type" => "varchar(255)", "comment" => ""],
393                         "followers" => ["type" => "varchar(255)", "comment" => ""],
394                         "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
395                         "outbox" => ["type" => "varchar(255)", "comment" => ""],
396                         "sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
397                         "featured" => ["type" => "varchar(255)", "comment" => "Address for the collection of featured posts"],
398                         "featured-tags" => ["type" => "varchar(255)", "comment" => "Address for the collection of featured tags"],
399                         "manually-approve" => ["type" => "boolean", "comment" => ""],
400                         "discoverable" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is published in their directory"],
401                         "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
402                         "name" => ["type" => "varchar(255)", "comment" => ""],
403                         "about" => ["type" => "text", "comment" => ""],
404                         "xmpp" => ["type" => "varchar(255)", "comment" => "XMPP address"],
405                         "matrix" => ["type" => "varchar(255)", "comment" => "Matrix address"],
406                         "photo" => ["type" => "varchar(255)", "comment" => ""],
407                         "header" => ["type" => "varchar(255)", "comment" => "Header picture"],
408                         "addr" => ["type" => "varchar(255)", "comment" => ""],
409                         "alias" => ["type" => "varchar(255)", "comment" => ""],
410                         "pubkey" => ["type" => "text", "comment" => ""],
411                         "subscribe" => ["type" => "varchar(255)", "comment" => ""],
412                         "baseurl" => ["type" => "varchar(255)", "comment" => "baseurl of the ap contact"],
413                         "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
414                         "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
415                         "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
416                         "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
417                         "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
418                         "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
419                 ],
420                 "indexes" => [
421                         "PRIMARY" => ["url"],
422                         "addr" => ["addr(32)"],
423                         "alias" => ["alias(190)"],
424                         "followers" => ["followers(190)"],
425                         "baseurl" => ["baseurl(190)"],
426                         "sharedinbox" => ["sharedinbox(190)"],
427                         "gsid" => ["gsid"],
428                         "uri-id" => ["UNIQUE", "uri-id"],
429                 ]
430         ],
431         "application" => [
432                 "comment" => "OAuth application",
433                 "fields" => [
434                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
435                         "client_id" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
436                         "client_secret" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
437                         "name" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
438                         "redirect_uri" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
439                         "website" => ["type" => "varchar(255)", "comment" => ""],
440                         "scopes" => ["type" => "varchar(255)", "comment" => ""],
441                         "read" => ["type" => "boolean", "comment" => "Read scope"],
442                         "write" => ["type" => "boolean", "comment" => "Write scope"],
443                         "follow" => ["type" => "boolean", "comment" => "Follow scope"],
444                         "push" => ["type" => "boolean", "comment" => "Push scope"],
445                 ],
446                 "indexes" => [
447                         "PRIMARY" => ["id"],
448                         "client_id" => ["UNIQUE", "client_id"]
449                 ]
450         ],
451         "application-token" => [
452                 "comment" => "OAuth user token",
453                 "fields" => [
454                         "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
455                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
456                         "code" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
457                         "access_token" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
458                         "created_at" => ["type" => "datetime", "not null" => "1", "comment" => "creation time"],
459                         "scopes" => ["type" => "varchar(255)", "comment" => ""],
460                         "read" => ["type" => "boolean", "comment" => "Read scope"],
461                         "write" => ["type" => "boolean", "comment" => "Write scope"],
462                         "follow" => ["type" => "boolean", "comment" => "Follow scope"],
463                         "push" => ["type" => "boolean", "comment" => "Push scope"],
464                 ],
465                 "indexes" => [
466                         "PRIMARY" => ["application-id", "uid"],
467                         "uid_id" => ["uid", "application-id"],
468                 ]
469         ],
470         "attach" => [
471                 "comment" => "file attachments",
472                 "fields" => [
473                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
474                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
475                         "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
476                         "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
477                         "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
478                         "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
479                         "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
480                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
481                         "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
482                         "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
483                         "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
484                         "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
485                         "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
486                         "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
487                         "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
488                 ],
489                 "indexes" => [
490                         "PRIMARY" => ["id"],
491                         "uid" => ["uid"],
492                 ]
493         ],
494         "cache" => [
495                 "comment" => "Stores temporary data",
496                 "fields" => [
497                         "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
498                         "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
499                         "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
500                         "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
501                 ],
502                 "indexes" => [
503                         "PRIMARY" => ["k"],
504                         "k_expires" => ["k", "expires"],
505                 ]
506         ],
507         "config" => [
508                 "comment" => "main configuration storage",
509                 "fields" => [
510                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
511                         "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
512                         "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
513                         "v" => ["type" => "mediumtext", "comment" => ""],
514                 ],
515                 "indexes" => [
516                         "PRIMARY" => ["id"],
517                         "cat_k" => ["UNIQUE", "cat", "k"],
518                 ]
519         ],
520         "contact-relation" => [
521                 "comment" => "Contact relations",
522                 "fields" => [
523                         "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "contact the related contact had interacted with"],
524                         "relation-cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "related contact who had interacted with the contact"],
525                         "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction"],
526                         "follow-updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last update of the contact relationship"],
527                         "follows" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
528                 ],
529                 "indexes" => [
530                         "PRIMARY" => ["cid", "relation-cid"],
531                         "relation-cid" => ["relation-cid"],
532                 ]
533         ],
534         "conv" => [
535                 "comment" => "private messages",
536                 "fields" => [
537                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
538                         "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
539                         "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
540                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
541                         "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
542                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
543                         "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
544                         "subject" => ["type" => "text", "comment" => "subject of initial message"],
545                 ],
546                 "indexes" => [
547                         "PRIMARY" => ["id"],
548                         "uid" => ["uid"],
549                 ]
550         ],
551         "conversation" => [
552                 "comment" => "Raw data and structure information for messages",
553                 "fields" => [
554                         "item-uri" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "Original URI of the item - unrelated to the table with the same name"],
555                         "reply-to-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "URI to which this item is a reply"],
556                         "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation URI"],
557                         "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation link"],
558                         "protocol" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "255", "comment" => "The protocol of the item"],
559                         "direction" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "How the message arrived here: 1=push, 2=pull"],
560                         "source" => ["type" => "mediumtext", "comment" => "Original source"],
561                         "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Receiving date"],
562                 ],
563                 "indexes" => [
564                         "PRIMARY" => ["item-uri"],
565                         "conversation-uri" => ["conversation-uri"],
566                         "received" => ["received"],
567                 ]
568         ],
569         "workerqueue" => [
570                 "comment" => "Background tasks queue entries",
571                 "fields" => [
572                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
573                         "command" => ["type" => "varchar(100)", "comment" => "Task command"],
574                         "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
575                         "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
576                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
577                         "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
578                         "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
579                         "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
580                         "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
581                         "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
582                 ],
583                 "indexes" => [
584                         "PRIMARY" => ["id"],
585                         "command" => ["command"],
586                         "done_command_parameter" => ["done", "command", "parameter(64)"],
587                         "done_executed" => ["done", "executed"],
588                         "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
589                         "done_priority_next_try" => ["done", "priority", "next_try"],
590                         "done_pid_next_try" => ["done", "pid", "next_try"],
591                         "done_pid_retrial" => ["done", "pid", "retrial"],
592                         "done_pid_priority_created" => ["done", "pid", "priority", "created"]
593                 ]
594         ],
595         "delayed-post" => [
596                 "comment" => "Posts that are about to be distributed at a later time",
597                 "fields" => [
598                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
599                         "uri" => ["type" => "varchar(255)", "comment" => "URI of the post that will be distributed later"],
600                         "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
601                         "delayed" => ["type" => "datetime", "comment" => "delay time"],
602                         "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"],
603                 ],
604                 "indexes" => [
605                         "PRIMARY" => ["id"],
606                         "uid_uri" => ["UNIQUE", "uid", "uri(190)"],
607                         "wid" => ["wid"],
608                 ]
609         ],
610         "diaspora-interaction" => [
611                 "comment" => "Signed Diaspora Interaction",
612                 "fields" => [
613                         "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"],
614                         "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
615                 ],
616                 "indexes" => [
617                         "PRIMARY" => ["uri-id"]
618                 ]
619         ],
620         "event" => [
621                 "comment" => "Events",
622                 "fields" => [
623                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
624                         "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
625                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
626                         "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
627                         "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
628                         "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the event uri"],
629                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
630                         "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
631                         "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
632                         "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
633                         "summary" => ["type" => "text", "comment" => "short description or title of the event"],
634                         "desc" => ["type" => "text", "comment" => "event description"],
635                         "location" => ["type" => "text", "comment" => "event location"],
636                         "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
637                         "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
638                         "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
639                         "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
640                         "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
641                         "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
642                         "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
643                 ],
644                 "indexes" => [
645                         "PRIMARY" => ["id"],
646                         "uid_start" => ["uid", "start"],
647                         "cid" => ["cid"],
648                         "uri-id" => ["uri-id"],
649                 ]
650         ],
651         "fcontact" => [
652                 "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
653                 "fields" => [
654                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
655                         "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "unique id"],
656                         "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
657                         "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the fcontact url"],
658                         "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
659                         "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
660                         "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
661                         "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
662                         "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
663                         "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
664                         "notify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
665                         "poll" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
666                         "confirm" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
667                         "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
668                         "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
669                         "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
670                         "pubkey" => ["type" => "text", "comment" => ""],
671                         "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
672                         "interacting_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts this contact interactes with"],
673                         "interacted_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts that interacted with this contact"],
674                         "post_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts and comments"],
675                 ],
676                 "indexes" => [
677                         "PRIMARY" => ["id"],
678                         "addr" => ["addr(32)"],
679                         "url" => ["UNIQUE", "url(190)"],
680                         "uri-id" => ["UNIQUE", "uri-id"],
681                 ]
682         ],
683         "fsuggest" => [
684                 "comment" => "friend suggestion stuff",
685                 "fields" => [
686                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
687                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
688                         "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
689                         "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
690                         "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
691                         "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
692                         "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
693                         "note" => ["type" => "text", "comment" => ""],
694                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
695                 ],
696                 "indexes" => [
697                         "PRIMARY" => ["id"],
698                         "cid" => ["cid"],
699                         "uid" => ["uid"],
700                 ]
701         ],
702         "group" => [
703                 "comment" => "privacy groups, group info",
704                 "fields" => [
705                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
706                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
707                         "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
708                         "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
709                         "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Contact id of forum. When this field is filled then the members are synced automatically."],
710                         "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
711                 ],
712                 "indexes" => [
713                         "PRIMARY" => ["id"],
714                         "uid" => ["uid"],
715                         "cid" => ["cid"],
716                 ]
717         ],
718         "group_member" => [
719                 "comment" => "privacy groups, member info",
720                 "fields" => [
721                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
722                         "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "groups.id of the associated group"],
723                         "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
724                 ],
725                 "indexes" => [
726                         "PRIMARY" => ["id"],
727                         "contactid" => ["contact-id"],
728                         "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
729                 ]
730         ],
731         "gserver-tag" => [
732                 "comment" => "Tags that the server has subscribed",
733                 "fields" => [
734                         "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["gserver" => "id"], "primary" => "1",
735                                 "comment" => "The id of the gserver"],
736                         "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
737                 ],
738                 "indexes" => [
739                         "PRIMARY" => ["gserver-id", "tag"],
740                         "tag" => ["tag"],
741                 ]
742         ],
743         "hook" => [
744                 "comment" => "addon hook registry",
745                 "fields" => [
746                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
747                         "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
748                         "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
749                         "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
750                         "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"],
751                 ],
752                 "indexes" => [
753                         "PRIMARY" => ["id"],
754                         "priority" => ["priority"],
755                         "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
756                 ]
757         ],
758         "inbox-status" => [
759                 "comment" => "Status of ActivityPub inboxes",
760                 "fields" => [
761                         "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
762                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
763                         "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
764                         "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
765                         "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
766                         "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
767                         "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
768                 ],
769                 "indexes" => [
770                         "PRIMARY" => ["url"]
771                 ]
772         ],
773         "intro" => [
774                 "comment" => "",
775                 "fields" => [
776                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
777                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
778                         "fid" => ["type" => "int unsigned", "relation" => ["fcontact" => "id"], "comment" => "deprecated"],
779                         "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
780                         "suggest-cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Suggested contact"],
781                         "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
782                         "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
783                         "note" => ["type" => "text", "comment" => ""],
784                         "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
785                         "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
786                         "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
787                         "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
788                 ],
789                 "indexes" => [
790                         "PRIMARY" => ["id"],
791                         "contact-id" => ["contact-id"],
792                         "suggest-cid" => ["suggest-cid"],
793                         "uid" => ["uid"],
794                 ]
795         ],
796         "locks" => [
797                 "comment" => "",
798                 "fields" => [
799                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
800                         "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
801                         "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
802                         "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
803                         "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
804                 ],
805                 "indexes" => [
806                         "PRIMARY" => ["id"],
807                         "name_expires" => ["name", "expires"]
808                 ]
809         ],
810         "mail" => [
811                 "comment" => "private messages",
812                 "fields" => [
813                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
814                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
815                         "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
816                         "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
817                         "from-photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
818                         "from-url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
819                         "contact-id" => ["type" => "varchar(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"],
820                         "author-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of the mail"],
821                         "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"],
822                         "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
823                         "body" => ["type" => "mediumtext", "comment" => ""],
824                         "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
825                         "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
826                         "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
827                         "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
828                         "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
829                         "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related mail"],
830                         "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
831                         "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related mail"],
832                         "thr-parent" => ["type" => "varchar(255)", "comment" => ""],
833                         "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
834                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
835                 ],
836                 "indexes" => [
837                         "PRIMARY" => ["id"],
838                         "uid_seen" => ["uid", "seen"],
839                         "convid" => ["convid"],
840                         "uri" => ["uri(64)"],
841                         "parent-uri" => ["parent-uri(64)"],
842                         "contactid" => ["contact-id(32)"],
843                         "author-id" => ["author-id"],
844                         "uri-id" => ["uri-id"],
845                         "parent-uri-id" => ["parent-uri-id"],
846                         "thr-parent-id" => ["thr-parent-id"],
847                 ]
848         ],
849         "mailacct" => [
850                 "comment" => "Mail account data for fetching mails",
851                 "fields" => [
852                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
853                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
854                         "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
855                         "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
856                         "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
857                         "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
858                         "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
859                         "pass" => ["type" => "text", "comment" => ""],
860                         "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
861                         "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
862                         "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
863                         "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
864                         "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
865                 ],
866                 "indexes" => [
867                         "PRIMARY" => ["id"],
868                         "uid" => ["uid"],
869                 ]
870         ],
871         "manage" => [
872                 "comment" => "table of accounts that can manage each other",
873                 "fields" => [
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", "foreign" => ["user" => "uid"], "comment" => "User id"],
876                         "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
877                 ],
878                 "indexes" => [
879                         "PRIMARY" => ["id"],
880                         "uid_mid" => ["UNIQUE", "uid", "mid"],
881                         "mid" => ["mid"],
882                 ]
883         ],
884         "notification" => [
885                 "comment" => "notifications",
886                 "fields" => [
887                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
888                         "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
889                         "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
890                         "type" => ["type" => "tinyint unsigned", "comment" => ""],
891                         "actor-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the actor that caused the notification"],
892                         "target-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
893                         "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
894                         "created" => ["type" => "datetime", "comment" => ""],
895                         "seen" => ["type" => "boolean", "default" => "0", "comment" => "Seen on the desktop"],
896                         "dismissed" => ["type" => "boolean", "default" => "0", "comment" => "Dismissed via the API"],
897                 ],
898                 "indexes" => [
899                         "PRIMARY" => ["id"],
900                         "uid_vid_type_actor-id_target-uri-id" => ["UNIQUE", "uid", "vid", "type", "actor-id", "target-uri-id"],
901                         "vid" => ["vid"],
902                         "actor-id" => ["actor-id"],
903                         "target-uri-id" => ["target-uri-id"],
904                         "parent-uri-id" => ["parent-uri-id"],
905                         "seen_uid" => ["seen", "uid"],
906                 ]
907         ],
908         "notify" => [
909                 "comment" => "[Deprecated] User notifications",
910                 "fields" => [
911                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
912                         "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
913                         "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
914                         "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
915                         "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
916                         "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
917                         "msg" => ["type" => "mediumtext", "comment" => ""],
918                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
919                         "link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
920                         "iid" => ["type" => "int unsigned", "comment" => ""],
921                         "parent" => ["type" => "int unsigned", "comment" => ""],
922                         "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
923                         "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
924                         "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
925                         "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
926                         "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
927                         "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
928                         "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
929                 ],
930                 "indexes" => [
931                         "PRIMARY" => ["id"],
932                         "seen_uid_date" => ["seen", "uid", "date"],
933                         "uid_date" => ["uid", "date"],
934                         "uid_type_link" => ["uid", "type", "link(190)"],
935                         "uri-id" => ["uri-id"],
936                         "parent-uri-id" => ["parent-uri-id"],
937                 ]
938         ],
939         "notify-threads" => [
940                 "comment" => "",
941                 "fields" => [
942                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
943                         "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["notify" => "id"], "comment" => ""],
944                         "master-parent-item" => ["type" => "int unsigned", "comment" => "Deprecated"],
945                         "master-parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
946                         "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
947                         "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"],
948                                 "comment" => "User id"],
949                 ],
950                 "indexes" => [
951                         "PRIMARY" => ["id"],
952                         "master-parent-uri-id" => ["master-parent-uri-id"],
953                         "receiver-uid" => ["receiver-uid"],
954                         "notify-id" => ["notify-id"],
955                 ]
956         ],
957         "oembed" => [
958                 "comment" => "cache for OEmbed queries",
959                 "fields" => [
960                         "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
961                         "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
962                         "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
963                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
964                 ],
965                 "indexes" => [
966                         "PRIMARY" => ["url", "maxwidth"],
967                         "created" => ["created"],
968                 ]
969         ],
970         "openwebauth-token" => [
971                 "comment" => "Store OpenWebAuth token to verify contacts",
972                 "fields" => [
973                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
974                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id - currently unused"],
975                         "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
976                         "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
977                         "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
978                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
979                 ],
980                 "indexes" => [
981                         "PRIMARY" => ["id"],
982                         "uid" => ["uid"],
983                 ]
984         ],
985         "parsed_url" => [
986                 "comment" => "cache for 'parse_url' queries",
987                 "fields" => [
988                         "url_hash" => ["type" => "binary(64)", "not null" => "1", "primary" => "1", "comment" => "page url hash"],
989                         "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
990                         "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
991                         "url" => ["type" => "text", "not null" => "1", "comment" => "page url"],
992                         "content" => ["type" => "mediumtext", "comment" => "page data"],
993                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
994                         "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of expiration"],
995                 ],
996                 "indexes" => [
997                         "PRIMARY" => ["url_hash", "guessing", "oembed"],
998                         "created" => ["created"],
999                         "expires" => ["expires"],
1000                 ]
1001         ],
1002         "pconfig" => [
1003                 "comment" => "personal (per user) configuration storage",
1004                 "fields" => [
1005                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Primary key"],
1006                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1007                         "cat" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "Category"],
1008                         "k" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "Key"],
1009                         "v" => ["type" => "mediumtext", "comment" => "Value"],
1010                 ],
1011                 "indexes" => [
1012                         "PRIMARY" => ["id"],
1013                         "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
1014                 ]
1015         ],
1016         "photo" => [
1017                 "comment" => "photo storage",
1018                 "fields" => [
1019                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1020                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid", "on delete" => "restrict"], "comment" => "Owner User id"],
1021                         "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "contact.id"],
1022                         "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
1023                         "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
1024                         "hash" => ["type" => "char(32)", "comment" => "hash value of the photo"],
1025                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
1026                         "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
1027                         "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1028                         "desc" => ["type" => "text", "comment" => ""],
1029                         "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
1030                         "photo-type" => ["type" => "tinyint unsigned", "comment" => "User avatar, user banner, contact avatar, contact banner or default"],
1031                         "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1032                         "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
1033                         "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1034                         "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1035                         "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1036                         "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
1037                         "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1038                         "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1039                         "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
1040                         "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
1041                         "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
1042                         "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
1043                         "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"],
1044                         "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
1045                         "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
1046                         "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1047                 ],
1048                 "indexes" => [
1049                         "PRIMARY" => ["id"],
1050                         "contactid" => ["contact-id"],
1051                         "uid_contactid" => ["uid", "contact-id"],
1052                         "uid_profile" => ["uid", "profile"],
1053                         "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
1054                         "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
1055                         "resource-id" => ["resource-id"],
1056                         "uid_photo-type" => ["uid", "photo-type"],
1057                 ]
1058         ],
1059         "post" => [
1060                 "comment" => "Structure for all posts",
1061                 "fields" => [
1062                         "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"],
1063                         "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1064                         "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1065                         "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1066                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1067                         "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1068                         "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1069                         "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1070                         "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1071                         "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the owner of this item"],
1072                         "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of this item"],
1073                         "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"],
1074                         "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1075                         "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1076                         "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1077                         "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1078                         "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1079                         "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"]
1080                 ],
1081                 "indexes" => [
1082                         "PRIMARY" => ["uri-id"],
1083                         "parent-uri-id" => ["parent-uri-id"],
1084                         "thr-parent-id" => ["thr-parent-id"],
1085                         "external-id" => ["external-id"],
1086                         "owner-id" => ["owner-id"],
1087                         "author-id" => ["author-id"],
1088                         "causer-id" => ["causer-id"],
1089                         "vid" => ["vid"],
1090                 ]
1091         ],
1092         "post-category" => [
1093                 "comment" => "post relation to categories",
1094                 "fields" => [
1095                         "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"],
1096                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1097                         "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1098                         "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1099                 ],
1100                 "indexes" => [
1101                         "PRIMARY" => ["uri-id", "uid", "type", "tid"],
1102                         "uri-id" => ["tid"],
1103                         "uid" => ["uid"],
1104                 ]
1105         ],
1106         "post-collection" => [
1107                 "comment" => "Collection of posts",
1108                 "fields" => [
1109                         "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"],
1110                         "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "0 - Featured"],
1111                 ],
1112                 "indexes" => [
1113                         "PRIMARY" => ["uri-id", "type"],
1114                         "type" => ["type"],
1115                 ]
1116         ],
1117         "post-content" => [
1118                 "comment" => "Content for all posts",
1119                 "fields" => [
1120                         "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"],
1121                         "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1122                         "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1123                         "body" => ["type" => "mediumtext", "comment" => "item body content"],
1124                         "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1125                         "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1126                         "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1127                         "language" => ["type" => "text", "comment" => "Language information about this post"],
1128                         "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1129                         "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1130                         "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1131                         "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1132                         "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1133                         "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1134                         "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1135                         "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"],
1136                         "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1137                 ],
1138                 "indexes" => [
1139                         "PRIMARY" => ["uri-id"],
1140                         "plink" => ["plink(191)"],
1141                         "resource-id" => ["resource-id"],
1142                         "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
1143                 ]
1144         ],
1145         "post-delivery-data" => [
1146                 "comment" => "Delivery data for items",
1147                 "fields" => [
1148                         "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"],
1149                         "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"],
1150                         "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
1151                         "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
1152                         "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
1153                         "queue_failed" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of unsuccessful deliveries, used as item.delivery_queue_failed"],
1154                         "activitypub" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via ActivityPub"],
1155                         "dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via DFRN"],
1156                         "legacy_dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via legacy DFRN"],
1157                         "diaspora" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via Diaspora"],
1158                         "ostatus" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via OStatus"],
1159                 ],
1160                 "indexes" => [
1161                         "PRIMARY" => ["uri-id"],
1162                 ]
1163         ],
1164         "post-link" => [
1165                 "comment" => "Post related external links",
1166                 "fields" => [
1167                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1168                         "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1169                         "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "External URL"],
1170                         "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1171                 ],
1172                 "indexes" => [
1173                         "PRIMARY" => ["id"],
1174                         "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1175                 ]
1176         ],
1177         "post-media" => [
1178                 "comment" => "Attached media",
1179                 "fields" => [
1180                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1181                         "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1182                         "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "Media URL"],
1183                         "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
1184                         "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1185                         "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1186                         "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1187                         "size" => ["type" => "int unsigned", "comment" => "Media size"],
1188                         "preview" => ["type" => "varbinary(255)", "comment" => "Preview URL"],
1189                         "preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
1190                         "preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
1191                         "description" => ["type" => "text", "comment" => ""],
1192                         "name" => ["type" => "varchar(255)", "comment" => "Name of the media"],
1193                         "author-url" => ["type" => "varbinary(255)", "comment" => "URL of the author of the media"],
1194                         "author-name" => ["type" => "varchar(255)", "comment" => "Name of the author of the media"],
1195                         "author-image" => ["type" => "varbinary(255)", "comment" => "Image of the author of the media"],
1196                         "publisher-url" => ["type" => "varbinary(255)", "comment" => "URL of the publisher of the media"],
1197                         "publisher-name" => ["type" => "varchar(255)", "comment" => "Name of the publisher of the media"],
1198                         "publisher-image" => ["type" => "varbinary(255)", "comment" => "Image of the publisher of the media"],
1199                 ],
1200                 "indexes" => [
1201                         "PRIMARY" => ["id"],
1202                         "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1203                 ]
1204         ],
1205         "post-question" => [
1206                 "comment" => "Question",
1207                 "fields" => [
1208                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1209                         "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1210                         "multiple" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Multiple choice"],
1211                         "voters" => ["type" => "int unsigned", "comment" => "Number of voters for this question"],
1212                         "end-time" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Question end time"],
1213                 ],
1214                 "indexes" => [
1215                         "PRIMARY" => ["id"],
1216                         "uri-id" => ["UNIQUE", "uri-id"],
1217                 ]
1218         ],
1219         "post-question-option" => [
1220                 "comment" => "Question option",
1221                 "fields" => [
1222                         "id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "Id of the question"],
1223                         "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"],
1224                         "name" => ["type" => "varchar(255)", "comment" => "Name of the option"],
1225                         "replies" => ["type" => "int unsigned", "comment" => "Number of replies for this question option"],
1226                 ],
1227                 "indexes" => [
1228                         "PRIMARY" => ["uri-id", "id"],
1229                 ]
1230         ],
1231         "post-tag" => [
1232                 "comment" => "post relation to tags",
1233                 "fields" => [
1234                         "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"],
1235                         "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1236                         "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1237                         "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"],
1238                 ],
1239                 "indexes" => [
1240                         "PRIMARY" => ["uri-id", "type", "tid", "cid"],
1241                         "tid" => ["tid"],
1242                         "cid" => ["cid"]
1243                 ]
1244         ],
1245         "post-thread" => [
1246                 "comment" => "Thread related data",
1247                 "fields" => [
1248                         "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"],
1249                         "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1250                         "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1251                         "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"],
1252                         "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1253                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1254                         "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1255                         "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"],
1256                         "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1257                 ],
1258                 "indexes" => [
1259                         "PRIMARY" => ["uri-id"],
1260                         "owner-id" => ["owner-id"],
1261                         "author-id" => ["author-id"],
1262                         "causer-id" => ["causer-id"],
1263                         "received" => ["received"],
1264                         "commented" => ["commented"],
1265                 ]
1266         ],
1267         "post-user" => [
1268                 "comment" => "User specific post data",
1269                 "fields" => [
1270                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
1271                         "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1272                         "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1273                         "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1274                         "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1275                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1276                         "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1277                         "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1278                         "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1279                         "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1280                         "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the owner of this item"],
1281                         "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of this item"],
1282                         "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"],
1283                         "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1284                         "post-reason" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Reason why the post arrived at the user"],
1285                         "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1286                         "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1287                         "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1288                         "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1289                         "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"],
1290                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1291                         "protocol" => ["type" => "tinyint unsigned", "comment" => "Protocol used to deliver the item for this user"],
1292                         "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1293                         "event-id" => ["type" => "int unsigned", "foreign" => ["event" => "id"], "comment" => "Used to link to the event.id"],
1294                         "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1295                         "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1296                         "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1297                         "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1298                         "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1299                         "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1300                 ],
1301                 "indexes" => [
1302                         "PRIMARY" => ["id"],
1303                         "uid_uri-id" => ["UNIQUE", "uid", "uri-id"],
1304                         "uri-id" => ["uri-id"],
1305                         "parent-uri-id" => ["parent-uri-id"],
1306                         "thr-parent-id" => ["thr-parent-id"],
1307                         "external-id" => ["external-id"],
1308                         "owner-id" => ["owner-id"],
1309                         "author-id" => ["author-id"],
1310                         "causer-id" => ["causer-id"],
1311                         "vid" => ["vid"],
1312                         "contact-id" => ["contact-id"],
1313                         "event-id" => ["event-id"],
1314                         "psid" => ["psid"],
1315                         "author-id_uid" => ["author-id", "uid"],
1316                         "author-id_received" => ["author-id", "received"],
1317                         "parent-uri-id_uid" => ["parent-uri-id", "uid"],
1318                         "uid_contactid" => ["uid", "contact-id"],
1319                         "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
1320                         "uid_unseen" => ["uid", "unseen"],
1321                         "uid_hidden_uri-id" => ["uid", "hidden", "uri-id"],
1322                 ],
1323         ],
1324         "post-thread-user" => [
1325                 "comment" => "Thread related data per user",
1326                 "fields" => [
1327                         "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"],
1328                         "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1329                         "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1330                         "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"],
1331                         "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1332                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1333                         "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1334                         "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"],
1335                         "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1336                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1337                         "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
1338                         "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1339                         "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"],
1340                         "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1341                         "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1342                         "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1343                         "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
1344                         "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1345                         "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1346                         "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1347                         "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1348                         "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1349                         "post-user-id" => ["type" => "int unsigned", "foreign" => ["post-user" => "id"], "comment" => "Id of the post-user table"],
1350                 ],
1351                 "indexes" => [
1352                         "PRIMARY" => ["uid", "uri-id"],
1353                         "uri-id" => ["uri-id"],
1354                         "owner-id" => ["owner-id"],
1355                         "author-id" => ["author-id"],
1356                         "causer-id" => ["causer-id"],
1357                         "uid" => ["uid"],
1358                         "contact-id" => ["contact-id"],
1359                         "psid" => ["psid"],
1360                         "post-user-id" => ["post-user-id"],
1361                         "commented" => ["commented"],
1362                         "uid_received" => ["uid", "received"],
1363                         "uid_wall_received" => ["uid", "wall", "received"],
1364                         "uid_commented" => ["uid", "commented"],
1365                         "uid_starred" => ["uid", "starred"],
1366                         "uid_mention" => ["uid", "mention"],
1367                 ]
1368         ],
1369         "post-user-notification" => [
1370                 "comment" => "User post notifications",
1371                 "fields" => [
1372                         "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"],
1373                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1374                         "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1375                 ],
1376                 "indexes" => [
1377                         "PRIMARY" => ["uid", "uri-id"],
1378                         "uri-id" => ["uri-id"],
1379                 ],
1380         ],
1381         "process" => [
1382                 "comment" => "Currently running system processes",
1383                 "fields" => [
1384                         "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "The ID of the process"],
1385                         "hostname" => ["type" => "varchar(32)", "not null" => "1", "primary" => "1", "comment" => "The name of the host the process is ran on"],
1386                         "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
1387                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1388                 ],
1389                 "indexes" => [
1390                         "PRIMARY" => ["pid", "hostname"],
1391                         "command" => ["command"],
1392                 ]
1393         ],
1394         "profile" => [
1395                 "comment" => "user profiles data",
1396                 "fields" => [
1397                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1398                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1399                         "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1400                         "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
1401                         "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
1402                         "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1403                         "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1404                         "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
1405                         "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1406                         "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1407                         "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1408                         "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1409                         "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1410                         "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1411                         "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
1412                         "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1413                         "with" => ["type" => "text", "comment" => "Deprecated"],
1414                         "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
1415                         "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1416                         "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1417                         "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1418                         "pub_keywords" => ["type" => "text", "comment" => ""],
1419                         "prv_keywords" => ["type" => "text", "comment" => ""],
1420                         "likes" => ["type" => "text", "comment" => "Deprecated"],
1421                         "dislikes" => ["type" => "text", "comment" => "Deprecated"],
1422                         "about" => ["type" => "text", "comment" => "Profile description"],
1423                         "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1424                         "music" => ["type" => "text", "comment" => "Deprecated"],
1425                         "book" => ["type" => "text", "comment" => "Deprecated"],
1426                         "tv" => ["type" => "text", "comment" => "Deprecated"],
1427                         "film" => ["type" => "text", "comment" => "Deprecated"],
1428                         "interest" => ["type" => "text", "comment" => "Deprecated"],
1429                         "romance" => ["type" => "text", "comment" => "Deprecated"],
1430                         "work" => ["type" => "text", "comment" => "Deprecated"],
1431                         "education" => ["type" => "text", "comment" => "Deprecated"],
1432                         "contact" => ["type" => "text", "comment" => "Deprecated"],
1433                         "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1434                         "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
1435                         "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
1436                         "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1437                         "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1438                         "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
1439                         "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
1440                 ],
1441                 "indexes" => [
1442                         "PRIMARY" => ["id"],
1443                         "uid_is-default" => ["uid", "is-default"],
1444                         "pub_keywords" => ["FULLTEXT", "pub_keywords"],
1445                 ]
1446         ],
1447         "profile_field" => [
1448                 "comment" => "Custom profile fields",
1449                 "fields" => [
1450                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1451                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner user id"],
1452                         "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
1453                         "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this profile field - 0 = public"],
1454                         "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
1455                         "value" => ["type" => "text", "comment" => "Value of the field"],
1456                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
1457                         "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
1458                 ],
1459                 "indexes" => [
1460                         "PRIMARY" => ["id"],
1461                         "uid" => ["uid"],
1462                         "order" => ["order"],
1463                         "psid" => ["psid"],
1464                 ]
1465         ],
1466         "push_subscriber" => [
1467                 "comment" => "Used for OStatus: Contains feed subscribers",
1468                 "fields" => [
1469                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1470                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1471                         "callback_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1472                         "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1473                         "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1474                         "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1475                         "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
1476                         "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1477                         "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
1478                         "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1479                 ],
1480                 "indexes" => [
1481                         "PRIMARY" => ["id"],
1482                         "next_try" => ["next_try"],
1483                         "uid" => ["uid"]
1484                 ]
1485         ],
1486         "register" => [
1487                 "comment" => "registrations requiring admin approval",
1488                 "fields" => [
1489                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1490                         "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1491                         "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1492                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1493                         "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1494                         "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1495                         "note" => ["type" => "text", "comment" => ""],
1496                 ],
1497                 "indexes" => [
1498                         "PRIMARY" => ["id"],
1499                         "uid" => ["uid"],
1500                 ]
1501         ],
1502         "search" => [
1503                 "comment" => "",
1504                 "fields" => [
1505                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1506                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1507                         "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1508                 ],
1509                 "indexes" => [
1510                         "PRIMARY" => ["id"],
1511                         "uid_term" => ["uid", "term(64)"],
1512                         "term" => ["term(64)"]
1513                 ]
1514         ],
1515         "session" => [
1516                 "comment" => "web session storage",
1517                 "fields" => [
1518                         "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1519                         "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1520                         "data" => ["type" => "text", "comment" => ""],
1521                         "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1522                 ],
1523                 "indexes" => [
1524                         "PRIMARY" => ["id"],
1525                         "sid" => ["sid(64)"],
1526                         "expire" => ["expire"],
1527                 ]
1528         ],
1529         "storage" => [
1530                 "comment" => "Data stored by Database storage backend",
1531                 "fields" => [
1532                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1533                         "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]
1534                 ],
1535                 "indexes" => [
1536                         "PRIMARY" => ["id"]
1537                 ]
1538         ],
1539         "subscription" => [
1540                 "comment" => "Push Subscription for the API",
1541                 "fields" => [
1542                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1543                         "application-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["application" => "id"], "comment" => ""],
1544                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1545                         "endpoint" => ["type" => "varchar(511)", "comment" => "Endpoint URL"],
1546                         "pubkey" => ["type" => "varchar(127)", "comment" => "User agent public key"],
1547                         "secret" => ["type" => "varchar(32)", "comment" => "Auth secret"],
1548                         "follow" => ["type" => "boolean", "comment" => ""],
1549                         "favourite" => ["type" => "boolean", "comment" => ""],
1550                         "reblog" => ["type" => "boolean", "comment" => ""],
1551                         "mention" => ["type" => "boolean", "comment" => ""],
1552                         "poll" => ["type" => "boolean", "comment" => ""],
1553                         "follow_request" => ["type" => "boolean", "comment" => ""],
1554                         "status" => ["type" => "boolean", "comment" => ""],
1555                 ],
1556                 "indexes" => [
1557                         "PRIMARY" => ["id"],
1558                         "application-id_uid" => ["UNIQUE", "application-id", "uid"],
1559                         "uid_application-id" => ["uid", "application-id"],
1560                 ]
1561         ],
1562         "userd" => [
1563                 "comment" => "Deleted usernames",
1564                 "fields" => [
1565                         "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1566                         "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
1567                 ],
1568                 "indexes" => [
1569                         "PRIMARY" => ["id"],
1570                         "username" => ["username(32)"],
1571                 ]
1572         ],
1573         "user-contact" => [
1574                 "comment" => "User specific public contact data",
1575                 "fields" => [
1576                         "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
1577                         "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1578                         "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
1579                         "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
1580                         "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
1581                         "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"],
1582                         "hidden" => ["type" => "boolean", "comment" => "This contact is hidden from the others"],
1583                         "is-blocked" => ["type" => "boolean", "comment" => "User is blocked by this contact"],
1584                         "pending" => ["type" => "boolean", "comment" => ""],
1585                         "rel" => ["type" => "tinyint unsigned", "comment" => "The kind of the relation between the user and the contact"],
1586                         "info" => ["type" => "mediumtext", "comment" => ""],
1587                         "notify_new_posts" => ["type" => "boolean", "comment" => ""],
1588                         "remote_self" => ["type" => "boolean", "comment" => ""],
1589                         "fetch_further_information" => ["type" => "tinyint unsigned", "comment" => ""],
1590                         "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
1591                         "subhub" => ["type" => "boolean", "comment" => ""],
1592                         "hub-verify" => ["type" => "varchar(255)", "comment" => ""],
1593                         "protocol" => ["type" => "char(4)", "comment" => "Protocol of the contact"],
1594                         "rating" => ["type" => "tinyint", "comment" => "Automatically detected feed poll frequency"],
1595                         "priority" => ["type" => "tinyint unsigned", "comment" => "Feed poll priority"],
1596                 ],
1597                 "indexes" => [
1598                         "PRIMARY" => ["uid", "cid"],
1599                         "cid" => ["cid"],
1600                         "uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
1601                 ]
1602         ],
1603         "worker-ipc" => [
1604                 "comment" => "Inter process communication between the frontend and the worker",
1605                 "fields" => [
1606                         "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
1607                         "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
1608                 ],
1609                 "indexes" => [
1610                         "PRIMARY" => ["key"],
1611                 ],
1612                 "engine" => "MEMORY",
1613         ],
1614 ];