3 * @copyright Copyright (C) 2010-2023, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 * Main database structure configuration file.
22 * Here are described all the tables, fields and indexes Friendica needs to work.
23 * The entry order is mostly alphabetic - with the exception of tables that are used in foreign keys.
25 * Syntax (braces indicate optionale values):
27 * "comment" => "Description of the table",
30 * "type" => "<field type>{(<field size>)} <unsigned>",
32 * {"extra" => "auto_increment",}
33 * {"default" => "<default value>",}
34 * {"default" => NULL_DATE,} (for datetime fields)
36 * {"foreign|relation" => ["<foreign key table name>" => "<foreign key field name>"],}
37 * "comment" => "Description of the fields"
42 * "PRIMARY" => ["<primary key field name>", ...],
43 * "<index name>" => [{"UNIQUE",} "<field name>{(<key size>)}", ...]
48 * Whenever possible prefer "foreign" before "relation" with the foreign keys.
49 * "foreign" adds true foreign keys on the database level, while "relation" is just an indicator of a table relation without any consequences
51 * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value below.
55 use Friendica\Database\DBA;
57 if (!defined('DB_UPDATE_VERSION')) {
58 define('DB_UPDATE_VERSION', 1517);
64 "comment" => "Global servers",
66 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
67 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
68 "nurl" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
69 "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
70 "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
71 "info" => ["type" => "text", "comment" => ""],
72 "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
73 "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
74 "active-week-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last week"],
75 "active-month-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last month"],
76 "active-halfyear-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last six month"],
77 "local-posts" => ["type" => "int unsigned", "comment" => "Number of local posts"],
78 "local-comments" => ["type" => "int unsigned", "comment" => "Number of local comments"],
79 "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
80 "poco" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
81 "noscrape" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
82 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
83 "protocol" => ["type" => "tinyint unsigned", "comment" => "The protocol of the server"],
84 "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
85 "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
86 "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
87 "detection-method" => ["type" => "tinyint unsigned", "comment" => "Method that had been used to detect that server"],
88 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
89 "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
90 "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last successful connection request"],
91 "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last failed connection request"],
92 "blocked" => ["type" => "boolean", "comment" => "Server is blocked"],
93 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
94 "next_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Next connection request"],
98 "nurl" => ["UNIQUE", "nurl(190)"],
99 "next_contact" => ["next_contact"],
100 "network" => ["network"],
104 "comment" => "The local users",
106 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
107 "parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "The parent user that has full control about this user"],
108 "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
109 "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
110 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
111 "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
112 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
113 "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
114 "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
115 "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
116 "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
117 "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
118 "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
119 "last-activity" => ["type" => "date", "comment" => "Day of the last activity"],
120 "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
121 "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
122 "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
123 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
124 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
125 "spubkey" => ["type" => "text", "comment" => ""],
126 "sprvkey" => ["type" => "text", "comment" => ""],
127 "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
128 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
129 "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
130 "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
131 "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
132 "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
133 "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
134 "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
135 "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
136 "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
137 "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
138 "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
139 "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
140 "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
141 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Delay in days before deleting user-related posts. Scope is controlled by pConfig."],
142 "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
143 "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
144 "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
145 "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
146 "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
147 "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
148 "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
149 "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
150 "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
151 "openidserver" => ["type" => "text", "comment" => ""],
154 "PRIMARY" => ["uid"],
155 "nickname" => ["nickname(32)"],
156 "parent-uid" => ["parent-uid"],
158 "email" => ["email(64)"],
162 "comment" => "URI and GUID for items",
164 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
165 "uri" => ["type" => "varbinary(383)", "not null" => "1", "comment" => "URI of an item"],
166 "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
170 "uri" => ["UNIQUE", "uri"],
175 "comment" => "contact table",
177 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
178 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
179 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
180 "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"],
181 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network of the contact"],
182 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
183 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
184 "location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
185 "about" => ["type" => "text", "comment" => ""],
186 "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
187 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
188 "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
189 "avatar" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
190 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the avatar"],
191 "header" => ["type" => "varbinary(383)", "comment" => "Header picture"],
192 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
193 "nurl" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
194 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
195 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
196 "alias" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
197 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
198 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
199 "batch" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
200 "notify" => ["type" => "varbinary(383)", "comment" => ""],
201 "poll" => ["type" => "varbinary(383)", "comment" => ""],
202 "subscribe" => ["type" => "varbinary(383)", "comment" => ""],
203 "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
204 "next-update" => ["type" => "datetime", "comment" => "Next connection request"],
205 "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
206 "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
207 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
208 "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
209 "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
210 "last-discovery" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last follower discovery"],
211 "local-data" => ["type" => "boolean", "comment" => "Is true when there are posts with this contact on the system"],
212 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Node-wide block status"],
213 "block_reason" => ["type" => "text", "comment" => "Node-wide block reason"],
214 "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
215 "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Person, organisation, news, community, relay"],
216 "manually-approve" => ["type" => "boolean", "comment" => "Contact requests have to be approved manually"],
217 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
218 "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"],
219 "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"],
220 "baseurl" => ["type" => "varbinary(383)", "default" => "", "comment" => "baseurl of the contact"],
221 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
222 "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
223 // User depending fields
224 "reason" => ["type" => "text", "comment" => ""],
225 "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
226 "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
227 "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
228 "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"],
229 "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
230 "hub-verify" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
231 "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Automatically detected feed poll frequency"],
232 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Feed poll priority"],
233 "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
234 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
235 "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Contact request is pending"],
236 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
237 "info" => ["type" => "mediumtext", "comment" => ""],
238 "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
239 "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
240 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
241 // Deprecated, but still in use
242 "photo" => ["type" => "varbinary(383)", "default" => "", "comment" => "Link to the profile photo of the contact"],
243 "thumb" => ["type" => "varbinary(383)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
244 "micro" => ["type" => "varbinary(383)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
245 "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
246 "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
247 "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
248 "request" => ["type" => "varbinary(383)", "comment" => ""],
249 "confirm" => ["type" => "varbinary(383)", "comment" => ""],
250 "poco" => ["type" => "varbinary(383)", "comment" => ""],
251 "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
252 "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = false instead"],
253 "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = true instead"],
254 "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
255 // Deprecated fields that aren't in use anymore
256 "site-pubkey" => ["type" => "text", "comment" => "Deprecated"],
257 "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
258 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
259 "issued-id" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
260 "dfrn-id" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
261 "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
262 "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
263 "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
264 "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => "Deprecated"],
265 "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
269 "uid_name" => ["uid", "name(190)"],
270 "self_uid" => ["self", "uid"],
271 "alias_uid" => ["alias(128)", "uid"],
272 "pending_uid" => ["pending", "uid"],
273 "blocked_uid" => ["blocked", "uid"],
274 "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
275 "uid_network_batch" => ["uid", "network", "batch(64)"],
276 "batch_contact-type" => ["batch(64)", "contact-type"],
277 "addr_uid" => ["addr(128)", "uid"],
278 "nurl_uid" => ["nurl(128)", "uid"],
279 "nick_uid" => ["nick(128)", "uid"],
280 "attag_uid" => ["attag(96)", "uid"],
281 "network_uid_lastupdate" => ["network", "uid", "last-update"],
282 "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
283 "next-update" => ["next-update"],
284 "local-data-next-update" => ["local-data", "next-update"],
285 "uid_lastitem" => ["uid", "last-item"],
286 "baseurl" => ["baseurl(64)"],
287 "uid_contact-type" => ["uid", "contact-type"],
288 "uid_self_contact-type" => ["uid", "self", "contact-type"],
289 "self_network_uid" => ["self", "network", "uid"],
290 "gsid_uid_failed" => ["gsid", "uid", "failed"],
291 "uri-id" => ["uri-id"],
295 "comment" => "tags and mentions",
297 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
298 "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
299 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
300 "type" => ["type" => "tinyint unsigned", "comment" => "Type of the tag (Unknown, General Collection, Follower Collection or Account)"],
304 "type_name_url" => ["UNIQUE", "name", "url"],
311 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
312 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
313 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
314 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
315 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
316 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
320 "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["uid", "allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
324 "comment" => "Activity Verbs",
326 "id" => ["type" => "smallint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
327 "name" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""]
335 "2fa_app_specific_password" => [
336 "comment" => "Two-factor app-specific _password",
338 "id" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Password ID for revocation"],
339 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
340 "description" => ["type" => "varchar(255)", "comment" => "Description of the usage of the password"],
341 "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "comment" => "Hashed password"],
342 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the password was generated"],
343 "last_used" => ["type" => "datetime", "comment" => "Datetime the password was last used"],
347 "uid_description" => ["uid", "description(190)"],
350 "2fa_recovery_codes" => [
351 "comment" => "Two-factor authentication recovery codes",
353 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
354 "code" => ["type" => "varchar(50)", "not null" => "1", "primary" => "1", "comment" => "Recovery code string"],
355 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the code was generated"],
356 "used" => ["type" => "datetime", "comment" => "Datetime the code was used"],
359 "PRIMARY" => ["uid", "code"]
362 "2fa_trusted_browser" => [
363 "comment" => "Two-factor authentication trusted browsers",
365 "cookie_hash" => ["type" => "varchar(80)", "not null" => "1", "primary" => "1", "comment" => "Trusted cookie hash"],
366 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
367 "user_agent" => ["type" => "text", "comment" => "User agent string"],
368 "trusted" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Whenever this browser should be trusted or not"],
369 "created" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the trusted browser was recorded"],
370 "last_used" => ["type" => "datetime", "comment" => "Datetime the trusted browser was last used"],
373 "PRIMARY" => ["cookie_hash"],
377 "account-suggestion" => [
378 "comment" => "Account suggestion",
380 "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"],
381 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
382 "level" => ["type" => "smallint unsigned", "comment" => "level of closeness"],
383 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "If set, this account will not be suggested again"], ],
385 "PRIMARY" => ["uid", "uri-id"],
386 "uri-id_uid" => ["uri-id", "uid"],
390 "comment" => "Remote and local accounts",
392 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
393 "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"],
394 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
398 "uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
399 "uid_uri-id" => ["uid", "uri-id"],
403 "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
405 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
406 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
407 "uuid" => ["type" => "varbinary(255)", "comment" => ""],
408 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
409 "following" => ["type" => "varbinary(383)", "comment" => ""],
410 "followers" => ["type" => "varbinary(383)", "comment" => ""],
411 "inbox" => ["type" => "varbinary(383)", "not null" => "1", "comment" => ""],
412 "outbox" => ["type" => "varbinary(383)", "comment" => ""],
413 "sharedinbox" => ["type" => "varbinary(383)", "comment" => ""],
414 "featured" => ["type" => "varbinary(383)", "comment" => "Address for the collection of featured posts"],
415 "featured-tags" => ["type" => "varbinary(383)", "comment" => "Address for the collection of featured tags"],
416 "manually-approve" => ["type" => "boolean", "comment" => ""],
417 "discoverable" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is published in their directory"],
418 "suspended" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is suspended"],
419 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
420 "name" => ["type" => "varchar(255)", "comment" => ""],
421 "about" => ["type" => "text", "comment" => ""],
422 "xmpp" => ["type" => "varchar(255)", "comment" => "XMPP address"],
423 "matrix" => ["type" => "varchar(255)", "comment" => "Matrix address"],
424 "photo" => ["type" => "varbinary(383)", "comment" => ""],
425 "header" => ["type" => "varbinary(383)", "comment" => "Header picture"],
426 "addr" => ["type" => "varchar(255)", "comment" => ""],
427 "alias" => ["type" => "varbinary(383)", "comment" => ""],
428 "pubkey" => ["type" => "text", "comment" => ""],
429 "subscribe" => ["type" => "varbinary(383)", "comment" => ""],
430 "baseurl" => ["type" => "varbinary(383)", "comment" => "baseurl of the ap contact"],
431 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
432 "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
433 "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
434 "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
435 "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
436 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
439 "PRIMARY" => ["url"],
440 "addr" => ["addr(32)"],
441 "alias" => ["alias(190)"],
442 "followers" => ["followers(190)"],
443 "baseurl" => ["baseurl(190)"],
444 "sharedinbox" => ["sharedinbox(190)"],
446 "uri-id" => ["UNIQUE", "uri-id"],
450 "comment" => "OAuth application",
452 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
453 "client_id" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
454 "client_secret" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
455 "name" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
456 "redirect_uri" => ["type" => "varbinary(383)", "not null" => "1", "comment" => ""],
457 "website" => ["type" => "varbinary(383)", "comment" => ""],
458 "scopes" => ["type" => "varchar(255)", "comment" => ""],
459 "read" => ["type" => "boolean", "comment" => "Read scope"],
460 "write" => ["type" => "boolean", "comment" => "Write scope"],
461 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
462 "push" => ["type" => "boolean", "comment" => "Push scope"],
466 "client_id" => ["UNIQUE", "client_id"]
469 "application-marker" => [
470 "comment" => "Timeline marker",
472 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
473 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
474 "timeline" => ["type" => "varchar(64)", "not null" => "1", "primary" => "1", "comment" => "Marker (home, notifications)"],
475 "last_read_id" => ["type" => "varbinary(383)", "comment" => "Marker id for the timeline"],
476 "version" => ["type" => "smallint unsigned", "comment" => "Version number"],
477 "updated_at" => ["type" => "datetime", "comment" => "creation time"],
480 "PRIMARY" => ["application-id", "uid", "timeline"],
484 "application-token" => [
485 "comment" => "OAuth user token",
487 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
488 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
489 "code" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
490 "access_token" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
491 "created_at" => ["type" => "datetime", "not null" => "1", "comment" => "creation time"],
492 "scopes" => ["type" => "varchar(255)", "comment" => ""],
493 "read" => ["type" => "boolean", "comment" => "Read scope"],
494 "write" => ["type" => "boolean", "comment" => "Write scope"],
495 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
496 "push" => ["type" => "boolean", "comment" => "Push scope"],
499 "PRIMARY" => ["application-id", "uid"],
500 "uid_id" => ["uid", "application-id"],
504 "comment" => "file attachments",
506 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
507 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
508 "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
509 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
510 "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
511 "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
512 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
513 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
514 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
515 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
516 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
517 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
518 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
519 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
520 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
528 "comment" => "Stores temporary data",
530 "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
531 "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
532 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
533 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
537 "k_expires" => ["k", "expires"],
541 "comment" => "main configuration storage",
543 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
544 "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => "The category of the entry"],
545 "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => "The key of the entry"],
546 "v" => ["type" => "mediumtext", "comment" => ""],
550 "cat_k" => ["UNIQUE", "cat", "k"],
553 "contact-relation" => [
554 "comment" => "Contact relations",
556 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "contact the related contact had interacted with"],
557 "relation-cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "related contact who had interacted with the contact"],
558 "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction"],
559 "follow-updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last update of the contact relationship"],
560 "follows" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
563 "PRIMARY" => ["cid", "relation-cid"],
564 "relation-cid" => ["relation-cid"],
568 "comment" => "private messages",
570 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
571 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
572 "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
573 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
574 "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
575 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
576 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
577 "subject" => ["type" => "text", "comment" => "subject of initial message"],
585 "comment" => "Background tasks queue entries",
587 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
588 "command" => ["type" => "varchar(100)", "comment" => "Task command"],
589 "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
590 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
591 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
592 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
593 "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
594 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
595 "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
596 "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
600 "command" => ["command"],
601 "done_command_parameter" => ["done", "command", "parameter(64)"],
602 "done_executed" => ["done", "executed"],
603 "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
604 "done_priority_next_try" => ["done", "priority", "next_try"],
605 "done_pid_next_try" => ["done", "pid", "next_try"],
606 "done_pid_retrial" => ["done", "pid", "retrial"],
607 "done_pid_priority_created" => ["done", "pid", "priority", "created"]
611 "comment" => "Posts that are about to be distributed at a later time",
613 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
614 "uri" => ["type" => "varbinary(383)", "comment" => "URI of the post that will be distributed later"],
615 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
616 "delayed" => ["type" => "datetime", "comment" => "delay time"],
617 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"],
621 "uid_uri" => ["UNIQUE", "uid", "uri(190)"],
625 "delivery-queue" => [
626 "comment" => "Delivery data for posts for the batch processing",
628 "gsid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Target server"],
629 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Delivered post"],
630 "created" => ["type" => "datetime", "comment" => ""],
631 "command" => ["type" => "varbinary(32)", "comment" => ""],
632 "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Target contact"],
633 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
634 "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
637 "PRIMARY" => ["uri-id", "gsid"],
638 "gsid_created" => ["gsid", "created"],
643 "diaspora-contact" => [
644 "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
646 "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"],
647 "addr" => ["type" => "varchar(255)", "comment" => ""],
648 "alias" => ["type" => "varchar(255)", "comment" => ""],
649 "nick" => ["type" => "varchar(255)", "comment" => ""],
650 "name" => ["type" => "varchar(255)", "comment" => ""],
651 "given-name" => ["type" => "varchar(255)", "comment" => ""],
652 "family-name" => ["type" => "varchar(255)", "comment" => ""],
653 "photo" => ["type" => "varchar(255)", "comment" => ""],
654 "photo-medium" => ["type" => "varchar(255)", "comment" => ""],
655 "photo-small" => ["type" => "varchar(255)", "comment" => ""],
656 "batch" => ["type" => "varchar(255)", "comment" => ""],
657 "notify" => ["type" => "varchar(255)", "comment" => ""],
658 "poll" => ["type" => "varchar(255)", "comment" => ""],
659 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
660 "searchable" => ["type" => "boolean", "comment" => ""],
661 "pubkey" => ["type" => "text", "comment" => ""],
662 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
663 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
664 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
665 "interacting_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts this contact interactes with"],
666 "interacted_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts that interacted with this contact"],
667 "post_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts and comments"],
670 "PRIMARY" => ["uri-id"],
671 "addr" => ["UNIQUE", "addr"],
672 "alias" => ["alias"],
676 "diaspora-interaction" => [
677 "comment" => "Signed Diaspora Interaction",
679 "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"],
680 "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
683 "PRIMARY" => ["uri-id"]
687 "comment" => "ActivityPub endpoints - used in the ActivityPub implementation",
689 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
690 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
691 "owner-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
694 "PRIMARY" => ["url"],
695 "owner-uri-id_type" => ["UNIQUE", "owner-uri-id", "type"],
699 "comment" => "Events",
701 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
702 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
703 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
704 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
705 "uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
706 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the event uri"],
707 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
708 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
709 "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
710 "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
711 "summary" => ["type" => "text", "comment" => "short description or title of the event"],
712 "desc" => ["type" => "text", "comment" => "event description"],
713 "location" => ["type" => "text", "comment" => "event location"],
714 "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
715 "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
716 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
717 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
718 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
719 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
720 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
724 "uid_start" => ["uid", "start"],
726 "uri-id" => ["uri-id"],
732 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
733 "url" => ["type" => "varbinary(383)", "comment" => "url that awaiting to be fetched"],
734 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of the fetch request"],
735 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"], ],
738 "url" => ["UNIQUE", "url"],
739 "created" => ["created"],
744 "comment" => "friend suggestion stuff",
746 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
747 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
748 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
749 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
750 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
751 "request" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
752 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
753 "note" => ["type" => "text", "comment" => ""],
754 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
763 "comment" => "privacy groups, group info",
765 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
766 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
767 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
768 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
769 "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Contact id of forum. When this field is filled then the members are synced automatically."],
770 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
779 "comment" => "privacy groups, member info",
781 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
782 "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "groups.id of the associated group"],
783 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
787 "contactid" => ["contact-id"],
788 "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
792 "comment" => "Tags that the server has subscribed",
794 "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["gserver" => "id"], "primary" => "1",
795 "comment" => "The id of the gserver"],
796 "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
799 "PRIMARY" => ["gserver-id", "tag"],
804 "comment" => "addon hook registry",
806 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
807 "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
808 "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
809 "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
810 "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"],
814 "priority" => ["priority"],
815 "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
819 "comment" => "Incoming activity",
821 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
822 "activity-id" => ["type" => "varbinary(383)", "comment" => "id of the incoming activity"],
823 "object-id" => ["type" => "varbinary(383)", "comment" => ""],
824 "in-reply-to-id" => ["type" => "varbinary(383)", "comment" => ""],
825 "conversation" => ["type" => "varbinary(383)", "comment" => ""],
826 "type" => ["type" => "varchar(64)", "comment" => "Type of the activity"],
827 "object-type" => ["type" => "varchar(64)", "comment" => "Type of the object activity"],
828 "object-object-type" => ["type" => "varchar(64)", "comment" => "Type of the object's object activity"],
829 "received" => ["type" => "datetime", "comment" => "Receiving date"],
830 "activity" => ["type" => "mediumtext", "comment" => "The JSON activity"],
831 "signer" => ["type" => "varchar(255)", "comment" => ""],
832 "push" => ["type" => "boolean", "comment" => "Is the entry pushed or have pulled it?"],
833 "trust" => ["type" => "boolean", "comment" => "Do we trust this entry?"],
834 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"], ],
837 "activity-id" => ["UNIQUE", "activity-id"],
838 "object-id" => ["object-id"],
839 "received" => ["received"],
843 "inbox-entry-receiver" => [
844 "comment" => "Receiver for the incoming activity",
846 "queue-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["inbox-entry" => "id"], "comment" => ""],
847 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
850 "PRIMARY" => ["queue-id", "uid"],
855 "comment" => "Status of ActivityPub inboxes",
857 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
858 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
859 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "ID of the related server"],
860 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
861 "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
862 "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
863 "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
864 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
865 "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
868 "PRIMARY" => ["url"],
869 "uri-id" => ["uri-id"],
876 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
877 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
878 "fid" => ["type" => "int unsigned", "comment" => "deprecated"],
879 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
880 "suggest-cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Suggested contact"],
881 "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
882 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
883 "note" => ["type" => "text", "comment" => ""],
884 "hash" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
885 "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
886 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
887 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
891 "contact-id" => ["contact-id"],
892 "suggest-cid" => ["suggest-cid"],
897 "comment" => "A key value storage",
899 "k" => ["type" => "varbinary(50)", "not null" => "1", "primary" => "1", "comment" => ""],
900 "v" => ["type" => "mediumtext", "comment" => ""],
901 "updated_at" => ["type" => "int unsigned", "not null" => "1", "comment" => "timestamp of the last update"],
910 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
911 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
912 "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
913 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
914 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
918 "name_expires" => ["name", "expires"]
922 "comment" => "private messages",
924 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
925 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
926 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
927 "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
928 "from-photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
929 "from-url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
930 "contact-id" => ["type" => "varbinary(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"],
931 "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"],
932 "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"],
933 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
934 "body" => ["type" => "mediumtext", "comment" => ""],
935 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
936 "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
937 "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
938 "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
939 "uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
940 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related mail"],
941 "parent-uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
942 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related mail"],
943 "thr-parent" => ["type" => "varbinary(383)", "comment" => ""],
944 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
945 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
949 "uid_seen" => ["uid", "seen"],
950 "convid" => ["convid"],
951 "uri" => ["uri(64)"],
952 "parent-uri" => ["parent-uri(64)"],
953 "contactid" => ["contact-id(32)"],
954 "author-id" => ["author-id"],
955 "uri-id" => ["uri-id"],
956 "parent-uri-id" => ["parent-uri-id"],
957 "thr-parent-id" => ["thr-parent-id"],
961 "comment" => "Mail account data for fetching mails",
963 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
964 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
965 "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
966 "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
967 "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
968 "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
969 "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
970 "pass" => ["type" => "text", "comment" => ""],
971 "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
972 "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
973 "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
974 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
975 "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
983 "comment" => "table of accounts that can manage each other",
985 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
986 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
987 "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
991 "uid_mid" => ["UNIQUE", "uid", "mid"],
996 "comment" => "notifications",
998 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
999 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1000 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1001 "type" => ["type" => "smallint unsigned", "comment" => ""],
1002 "actor-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the actor that caused the notification"],
1003 "target-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
1004 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1005 "created" => ["type" => "datetime", "comment" => ""],
1006 "seen" => ["type" => "boolean", "default" => "0", "comment" => "Seen on the desktop"],
1007 "dismissed" => ["type" => "boolean", "default" => "0", "comment" => "Dismissed via the API"],
1010 "PRIMARY" => ["id"],
1011 "uid_vid_type_actor-id_target-uri-id" => ["UNIQUE", "uid", "vid", "type", "actor-id", "target-uri-id"],
1013 "actor-id" => ["actor-id"],
1014 "target-uri-id" => ["target-uri-id"],
1015 "parent-uri-id" => ["parent-uri-id"],
1016 "seen_uid" => ["seen", "uid"],
1017 "uid_type_parent-uri-id_actor-id" => ["uid", "type", "parent-uri-id", "actor-id"],
1021 "comment" => "[Deprecated] User notifications",
1023 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1024 "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1025 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1026 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1027 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1028 "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1029 "msg" => ["type" => "mediumtext", "comment" => ""],
1030 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1031 "link" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1032 "iid" => ["type" => "int unsigned", "comment" => ""],
1033 "parent" => ["type" => "int unsigned", "comment" => ""],
1034 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
1035 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1036 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1037 "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
1038 "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
1039 "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
1040 "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
1043 "PRIMARY" => ["id"],
1044 "seen_uid_date" => ["seen", "uid", "date"],
1045 "uid_date" => ["uid", "date"],
1046 "uid_type_link" => ["uid", "type", "link(190)"],
1047 "uri-id" => ["uri-id"],
1048 "parent-uri-id" => ["parent-uri-id"],
1051 "notify-threads" => [
1054 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1055 "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["notify" => "id"], "comment" => ""],
1056 "master-parent-item" => ["type" => "int unsigned", "comment" => "Deprecated"],
1057 "master-parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1058 "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1059 "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"],
1060 "comment" => "User id"],
1063 "PRIMARY" => ["id"],
1064 "master-parent-uri-id" => ["master-parent-uri-id"],
1065 "receiver-uid" => ["receiver-uid"],
1066 "notify-id" => ["notify-id"],
1070 "comment" => "cache for OEmbed queries",
1072 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "page url"],
1073 "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
1074 "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
1075 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1078 "PRIMARY" => ["url", "maxwidth"],
1079 "created" => ["created"],
1082 "openwebauth-token" => [
1083 "comment" => "Store OpenWebAuth token to verify contacts",
1085 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1086 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id - currently unused"],
1087 "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
1088 "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
1089 "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1090 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1093 "PRIMARY" => ["id"],
1098 "comment" => "cache for 'parse_url' queries",
1100 "url_hash" => ["type" => "binary(64)", "not null" => "1", "primary" => "1", "comment" => "page url hash"],
1101 "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
1102 "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
1103 "url" => ["type" => "text", "not null" => "1", "comment" => "page url"],
1104 "content" => ["type" => "mediumtext", "comment" => "page data"],
1105 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1106 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of expiration"],
1109 "PRIMARY" => ["url_hash", "guessing", "oembed"],
1110 "created" => ["created"],
1111 "expires" => ["expires"],
1115 "comment" => "personal (per user) configuration storage",
1117 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Primary key"],
1118 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1119 "cat" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "Category"],
1120 "k" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "Key"],
1121 "v" => ["type" => "mediumtext", "comment" => "Value"],
1124 "PRIMARY" => ["id"],
1125 "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
1129 "comment" => "photo storage",
1131 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1132 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid", "on delete" => "restrict"], "comment" => "Owner User id"],
1133 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "contact.id"],
1134 "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
1135 "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
1136 "hash" => ["type" => "char(32)", "comment" => "hash value of the photo"],
1137 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
1138 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
1139 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1140 "desc" => ["type" => "text", "comment" => ""],
1141 "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
1142 "photo-type" => ["type" => "tinyint unsigned", "comment" => "User avatar, user banner, contact avatar, contact banner or default"],
1143 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1144 "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
1145 "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1146 "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1147 "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1148 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the photo"],
1149 "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
1150 "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1151 "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1152 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
1153 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
1154 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
1155 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
1156 "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"],
1157 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
1158 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
1159 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1162 "PRIMARY" => ["id"],
1163 "contactid" => ["contact-id"],
1164 "uid_contactid" => ["uid", "contact-id"],
1165 "uid_profile" => ["uid", "profile"],
1166 "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
1167 "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
1168 "resource-id" => ["resource-id"],
1169 "uid_photo-type" => ["uid", "photo-type"],
1173 "comment" => "Structure for all posts",
1175 "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"],
1176 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1177 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1178 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1179 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1180 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1181 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1182 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1183 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1184 "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"],
1185 "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"],
1186 "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"],
1187 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1188 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1189 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1190 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1191 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1192 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"]
1195 "PRIMARY" => ["uri-id"],
1196 "parent-uri-id" => ["parent-uri-id"],
1197 "thr-parent-id" => ["thr-parent-id"],
1198 "external-id" => ["external-id"],
1199 "owner-id" => ["owner-id"],
1200 "author-id" => ["author-id"],
1201 "causer-id" => ["causer-id"],
1205 "post-activity" => [
1206 "comment" => "Original remote activity",
1208 "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"],
1209 "activity" => ["type" => "mediumtext", "comment" => "Original activity"],
1210 "received" => ["type" => "datetime", "comment" => ""],
1213 "PRIMARY" => ["uri-id"],
1216 "post-category" => [
1217 "comment" => "post relation to categories",
1219 "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"],
1220 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1221 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1222 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1225 "PRIMARY" => ["uri-id", "uid", "type", "tid"],
1227 "uid_uri-id" => ["uid", "uri-id"],
1230 "post-collection" => [
1231 "comment" => "Collection of posts",
1233 "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"],
1234 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "0 - Featured"],
1235 "author-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Author of the featured post"],
1238 "PRIMARY" => ["uri-id", "type"],
1240 "author-id" => ["author-id"],
1244 "comment" => "Content for all posts",
1246 "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"],
1247 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1248 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1249 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1250 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1251 "quote-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the quoted uri"],
1252 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1253 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1254 "language" => ["type" => "text", "comment" => "Language information about this post"],
1255 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1256 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1257 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1258 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1259 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1260 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1261 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1262 "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"],
1263 "plink" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1266 "PRIMARY" => ["uri-id"],
1267 "plink" => ["plink(191)"],
1268 "resource-id" => ["resource-id"],
1269 "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
1270 "quote-uri-id" => ["quote-uri-id"],
1273 "post-delivery" => [
1274 "comment" => "Delivery data for posts for the batch processing",
1276 "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"],
1277 "inbox-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
1278 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
1279 "created" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
1280 "command" => ["type" => "varbinary(32)", "comment" => ""],
1281 "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
1282 "receivers" => ["type" => "mediumtext", "comment" => "JSON encoded array with the receiving contacts"],
1285 "PRIMARY" => ["uri-id", "inbox-id"],
1286 "inbox-id_created" => ["inbox-id", "created"],
1290 "post-delivery-data" => [
1291 "comment" => "Delivery data for items",
1293 "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"],
1294 "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"],
1295 "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
1296 "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
1297 "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
1298 "queue_failed" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of unsuccessful deliveries, used as item.delivery_queue_failed"],
1299 "activitypub" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via ActivityPub"],
1300 "dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via DFRN"],
1301 "legacy_dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via legacy DFRN"],
1302 "diaspora" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via Diaspora"],
1303 "ostatus" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via OStatus"],
1306 "PRIMARY" => ["uri-id"],
1310 "comment" => "Post history",
1312 "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"],
1313 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "primary" => "1", "comment" => "Date of edit"],
1314 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1315 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1316 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1317 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1318 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1319 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1320 "language" => ["type" => "text", "comment" => "Language information about this post"],
1321 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1322 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1323 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1324 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1325 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1326 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1327 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1328 "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"],
1329 "plink" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1332 "PRIMARY" => ["uri-id", "edited"],
1336 "comment" => "Post related external links",
1338 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1339 "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"],
1340 "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "External URL"],
1341 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1342 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1343 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1344 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the link"],
1347 "PRIMARY" => ["id"],
1348 "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1352 "comment" => "Attached media",
1354 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1355 "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1356 "url" => ["type" => "varbinary(1024)", "not null" => "1", "comment" => "Media URL"],
1357 "media-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the activities uri-id"],
1358 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
1359 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1360 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1361 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1362 "size" => ["type" => "bigint unsigned", "comment" => "Media size"],
1363 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the image"],
1364 "preview" => ["type" => "varbinary(512)", "comment" => "Preview URL"],
1365 "preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
1366 "preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
1367 "description" => ["type" => "text", "comment" => ""],
1368 "name" => ["type" => "varchar(255)", "comment" => "Name of the media"],
1369 "author-url" => ["type" => "varbinary(383)", "comment" => "URL of the author of the media"],
1370 "author-name" => ["type" => "varchar(255)", "comment" => "Name of the author of the media"],
1371 "author-image" => ["type" => "varbinary(383)", "comment" => "Image of the author of the media"],
1372 "publisher-url" => ["type" => "varbinary(383)", "comment" => "URL of the publisher of the media"],
1373 "publisher-name" => ["type" => "varchar(255)", "comment" => "Name of the publisher of the media"],
1374 "publisher-image" => ["type" => "varbinary(383)", "comment" => "Image of the publisher of the media"],
1377 "PRIMARY" => ["id"],
1378 "uri-id-url" => ["UNIQUE", "uri-id", "url(512)"],
1379 "uri-id-id" => ["uri-id", "id"],
1380 "media-uri-id" => ["media-uri-id"],
1383 "post-question" => [
1384 "comment" => "Question",
1386 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1387 "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"],
1388 "multiple" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Multiple choice"],
1389 "voters" => ["type" => "int unsigned", "comment" => "Number of voters for this question"],
1390 "end-time" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Question end time"],
1393 "PRIMARY" => ["id"],
1394 "uri-id" => ["UNIQUE", "uri-id"],
1397 "post-question-option" => [
1398 "comment" => "Question option",
1400 "id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "Id of the question"],
1401 "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"],
1402 "name" => ["type" => "varchar(255)", "comment" => "Name of the option"],
1403 "replies" => ["type" => "int unsigned", "comment" => "Number of replies for this question option"],
1406 "PRIMARY" => ["uri-id", "id"],
1410 "comment" => "post relation to tags",
1412 "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"],
1413 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1414 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1415 "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"],
1418 "PRIMARY" => ["uri-id", "type", "tid", "cid"],
1424 "comment" => "Thread related data",
1426 "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"],
1427 "conversation-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the conversation uri"],
1428 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1429 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1430 "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"],
1431 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1432 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1433 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1434 "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"],
1435 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1438 "PRIMARY" => ["uri-id"],
1439 "conversation-id" => ["conversation-id"],
1440 "owner-id" => ["owner-id"],
1441 "author-id" => ["author-id"],
1442 "causer-id" => ["causer-id"],
1443 "received" => ["received"],
1444 "commented" => ["commented"],
1448 "comment" => "User specific post data",
1450 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
1451 "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"],
1452 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1453 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1454 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1455 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1456 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1457 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1458 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1459 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1460 "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"],
1461 "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"],
1462 "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"],
1463 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1464 "post-reason" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Reason why the post arrived at the user"],
1465 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1466 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1467 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1468 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1469 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"],
1470 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1471 "protocol" => ["type" => "tinyint unsigned", "comment" => "Protocol used to deliver the item for this user"],
1472 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1473 "event-id" => ["type" => "int unsigned", "foreign" => ["event" => "id"], "comment" => "Used to link to the event.id"],
1474 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1475 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1476 "notification-type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1477 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1478 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1479 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1482 "PRIMARY" => ["id"],
1483 "uid_uri-id" => ["UNIQUE", "uid", "uri-id"],
1484 "uri-id" => ["uri-id"],
1485 "parent-uri-id" => ["parent-uri-id"],
1486 "thr-parent-id" => ["thr-parent-id"],
1487 "external-id" => ["external-id"],
1488 "owner-id" => ["owner-id"],
1489 "author-id" => ["author-id"],
1490 "causer-id" => ["causer-id"],
1492 "contact-id" => ["contact-id"],
1493 "event-id" => ["event-id"],
1495 "author-id_uid" => ["author-id", "uid"],
1496 "author-id_received" => ["author-id", "received"],
1497 "parent-uri-id_uid" => ["parent-uri-id", "uid"],
1498 "uid_wall_received" => ["uid", "wall", "received"],
1499 "uid_contactid" => ["uid", "contact-id"],
1500 "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
1501 "uid_unseen" => ["uid", "unseen"],
1502 "uid_hidden_uri-id" => ["uid", "hidden", "uri-id"],
1505 "post-thread-user" => [
1506 "comment" => "Thread related data per user",
1508 "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"],
1509 "conversation-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the conversation uri"],
1510 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1511 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1512 "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"],
1513 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1514 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1515 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1516 "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"],
1517 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1518 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1519 "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
1520 "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1521 "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"],
1522 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1523 "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1524 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1525 "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
1526 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1527 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1528 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1529 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1530 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1531 "post-user-id" => ["type" => "int unsigned", "foreign" => ["post-user" => "id"], "comment" => "Id of the post-user table"],
1534 "PRIMARY" => ["uid", "uri-id"],
1535 "uri-id" => ["uri-id"],
1536 "conversation-id" => ["conversation-id"],
1537 "owner-id" => ["owner-id"],
1538 "author-id" => ["author-id"],
1539 "causer-id" => ["causer-id"],
1541 "contact-id" => ["contact-id"],
1543 "post-user-id" => ["post-user-id"],
1544 "commented" => ["commented"],
1545 "uid_received" => ["uid", "received"],
1546 "uid_wall_received" => ["uid", "wall", "received"],
1547 "uid_commented" => ["uid", "commented"],
1548 "uid_starred" => ["uid", "starred"],
1549 "uid_mention" => ["uid", "mention"],
1552 "post-user-notification" => [
1553 "comment" => "User post notifications",
1555 "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"],
1556 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1557 "notification-type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1560 "PRIMARY" => ["uid", "uri-id"],
1561 "uri-id" => ["uri-id"],
1565 "comment" => "Currently running system processes",
1567 "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "The ID of the process"],
1568 "hostname" => ["type" => "varchar(255)", "not null" => "1", "primary" => "1", "comment" => "The name of the host the process is ran on"],
1569 "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
1570 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1573 "PRIMARY" => ["pid", "hostname"],
1574 "command" => ["command"],
1578 "comment" => "user profiles data",
1580 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1581 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1582 "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1583 "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
1584 "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
1585 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1586 "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1587 "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
1588 "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1589 "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1590 "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1591 "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1592 "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1593 "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1594 "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
1595 "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1596 "with" => ["type" => "text", "comment" => "Deprecated"],
1597 "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
1598 "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1599 "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1600 "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1601 "pub_keywords" => ["type" => "text", "comment" => ""],
1602 "prv_keywords" => ["type" => "text", "comment" => ""],
1603 "likes" => ["type" => "text", "comment" => "Deprecated"],
1604 "dislikes" => ["type" => "text", "comment" => "Deprecated"],
1605 "about" => ["type" => "text", "comment" => "Profile description"],
1606 "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1607 "music" => ["type" => "text", "comment" => "Deprecated"],
1608 "book" => ["type" => "text", "comment" => "Deprecated"],
1609 "tv" => ["type" => "text", "comment" => "Deprecated"],
1610 "film" => ["type" => "text", "comment" => "Deprecated"],
1611 "interest" => ["type" => "text", "comment" => "Deprecated"],
1612 "romance" => ["type" => "text", "comment" => "Deprecated"],
1613 "work" => ["type" => "text", "comment" => "Deprecated"],
1614 "education" => ["type" => "text", "comment" => "Deprecated"],
1615 "contact" => ["type" => "text", "comment" => "Deprecated"],
1616 "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1617 "homepage_verified" => ["type" => "boolean", "not null" => 1, "default" => "0", "comment" => "was the homepage verified by a rel-me link back to the profile"],
1618 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
1619 "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
1620 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1621 "thumb" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1622 "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
1623 "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
1626 "PRIMARY" => ["id"],
1627 "uid_is-default" => ["uid", "is-default"],
1628 "pub_keywords" => ["FULLTEXT", "pub_keywords"],
1631 "profile_field" => [
1632 "comment" => "Custom profile fields",
1634 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1635 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner user id"],
1636 "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
1637 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this profile field - 0 = public"],
1638 "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
1639 "value" => ["type" => "text", "comment" => "Value of the field"],
1640 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
1641 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
1644 "PRIMARY" => ["id"],
1646 "order" => ["order"],
1650 "push_subscriber" => [
1651 "comment" => "Used for OStatus: Contains feed subscribers",
1653 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1654 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1655 "callback_url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1656 "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1657 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1658 "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1659 "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
1660 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1661 "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
1662 "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1665 "PRIMARY" => ["id"],
1666 "next_try" => ["next_try"],
1671 "comment" => "registrations requiring admin approval",
1673 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1674 "hash" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1675 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1676 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1677 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1678 "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1679 "note" => ["type" => "text", "comment" => ""],
1682 "PRIMARY" => ["id"],
1689 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1690 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Reporting user"],
1691 "reporter-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Reporting contact"],
1692 "cid" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["contact" => "id"], "comment" => "Reported contact"],
1693 "comment" => ["type" => "text", "comment" => "Report"],
1694 "category" => ["type" => "varchar(20)", "comment" => "Category of the report (spam, violation, other)"],
1695 "rules" => ["type" => "text", "comment" => "Violated rules"],
1696 "forward" => ["type" => "boolean", "comment" => "Forward the report to the remote server"],
1697 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1698 "status" => ["type" => "tinyint unsigned", "comment" => "Status of the report"],
1701 "PRIMARY" => ["id"],
1704 "reporter-id" => ["reporter-id"],
1710 "rid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["report" => "id"], "comment" => "Report id"],
1711 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Uri-id of the reported post"],
1712 "status" => ["type" => "tinyint unsigned", "comment" => "Status of the reported post"],
1715 "PRIMARY" => ["rid", "uri-id"],
1716 "uri-id" => ["uri-id"],
1722 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1723 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1724 "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1727 "PRIMARY" => ["id"],
1728 "uid_term" => ["uid", "term(64)"],
1729 "term" => ["term(64)"]
1733 "comment" => "web session storage",
1735 "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1736 "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1737 "data" => ["type" => "text", "comment" => ""],
1738 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1741 "PRIMARY" => ["id"],
1742 "sid" => ["sid(64)"],
1743 "expire" => ["expire"],
1747 "comment" => "Data stored by Database storage backend",
1749 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1750 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]
1757 "comment" => "Push Subscription for the API",
1759 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1760 "application-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["application" => "id"], "comment" => ""],
1761 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1762 "endpoint" => ["type" => "varchar(511)", "comment" => "Endpoint URL"],
1763 "pubkey" => ["type" => "varchar(127)", "comment" => "User agent public key"],
1764 "secret" => ["type" => "varchar(32)", "comment" => "Auth secret"],
1765 "follow" => ["type" => "boolean", "comment" => ""],
1766 "favourite" => ["type" => "boolean", "comment" => ""],
1767 "reblog" => ["type" => "boolean", "comment" => ""],
1768 "mention" => ["type" => "boolean", "comment" => ""],
1769 "poll" => ["type" => "boolean", "comment" => ""],
1770 "follow_request" => ["type" => "boolean", "comment" => ""],
1771 "status" => ["type" => "boolean", "comment" => ""],
1774 "PRIMARY" => ["id"],
1775 "application-id_uid" => ["UNIQUE", "application-id", "uid"],
1776 "uid_application-id" => ["uid", "application-id"],
1780 "comment" => "Deleted usernames",
1782 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1783 "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
1786 "PRIMARY" => ["id"],
1787 "username" => ["username(32)"],
1791 "comment" => "User specific public contact data",
1793 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
1794 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1795 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
1796 "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
1797 "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
1798 "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"],
1799 "hidden" => ["type" => "boolean", "comment" => "This contact is hidden from the others"],
1800 "is-blocked" => ["type" => "boolean", "comment" => "User is blocked by this contact"],
1801 "pending" => ["type" => "boolean", "comment" => ""],
1802 "rel" => ["type" => "tinyint unsigned", "comment" => "The kind of the relation between the user and the contact"],
1803 "info" => ["type" => "mediumtext", "comment" => ""],
1804 "notify_new_posts" => ["type" => "boolean", "comment" => ""],
1805 "remote_self" => ["type" => "boolean", "comment" => ""],
1806 "fetch_further_information" => ["type" => "tinyint unsigned", "comment" => ""],
1807 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
1808 "subhub" => ["type" => "boolean", "comment" => ""],
1809 "hub-verify" => ["type" => "varbinary(383)", "comment" => ""],
1810 "protocol" => ["type" => "char(4)", "comment" => "Protocol of the contact"],
1811 "rating" => ["type" => "tinyint", "comment" => "Automatically detected feed poll frequency"],
1812 "priority" => ["type" => "tinyint unsigned", "comment" => "Feed poll priority"],
1815 "PRIMARY" => ["uid", "cid"],
1817 "uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
1820 "arrived-activity" => [
1821 "comment" => "Id of arrived activities",
1823 "object-id" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "object id of the incoming activity"],
1824 "received" => ["type" => "datetime", "comment" => "Receiving date"],
1827 "PRIMARY" => ["object-id"],
1829 "engine" => "MEMORY",
1831 "fetched-activity" => [
1832 "comment" => "Id of fetched activities",
1834 "object-id" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "object id of fetched activity"],
1835 "received" => ["type" => "datetime", "comment" => "Receiving date"],
1838 "PRIMARY" => ["object-id"],
1840 "engine" => "MEMORY",
1843 "comment" => "Inter process communication between the frontend and the worker",
1845 "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
1846 "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
1849 "PRIMARY" => ["key"],
1851 "engine" => "MEMORY",