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