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', 1513);
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" => "registered addons",
405 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
406 "name" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "addon base (file)name"],
407 "version" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "currently unused"],
408 "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently always 1"],
409 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently unused"],
410 "timestamp" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "file timestamp to check for reloads"],
411 "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = has admin config, 0 = has no admin config"],
415 "installed_name" => ["installed", "name"],
416 "name" => ["UNIQUE", "name"],
420 "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
422 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
423 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
424 "uuid" => ["type" => "varbinary(255)", "comment" => ""],
425 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
426 "following" => ["type" => "varbinary(383)", "comment" => ""],
427 "followers" => ["type" => "varbinary(383)", "comment" => ""],
428 "inbox" => ["type" => "varbinary(383)", "not null" => "1", "comment" => ""],
429 "outbox" => ["type" => "varbinary(383)", "comment" => ""],
430 "sharedinbox" => ["type" => "varbinary(383)", "comment" => ""],
431 "featured" => ["type" => "varbinary(383)", "comment" => "Address for the collection of featured posts"],
432 "featured-tags" => ["type" => "varbinary(383)", "comment" => "Address for the collection of featured tags"],
433 "manually-approve" => ["type" => "boolean", "comment" => ""],
434 "discoverable" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is published in their directory"],
435 "suspended" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is suspended"],
436 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
437 "name" => ["type" => "varchar(255)", "comment" => ""],
438 "about" => ["type" => "text", "comment" => ""],
439 "xmpp" => ["type" => "varchar(255)", "comment" => "XMPP address"],
440 "matrix" => ["type" => "varchar(255)", "comment" => "Matrix address"],
441 "photo" => ["type" => "varbinary(383)", "comment" => ""],
442 "header" => ["type" => "varbinary(383)", "comment" => "Header picture"],
443 "addr" => ["type" => "varchar(255)", "comment" => ""],
444 "alias" => ["type" => "varbinary(383)", "comment" => ""],
445 "pubkey" => ["type" => "text", "comment" => ""],
446 "subscribe" => ["type" => "varbinary(383)", "comment" => ""],
447 "baseurl" => ["type" => "varbinary(383)", "comment" => "baseurl of the ap contact"],
448 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
449 "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
450 "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
451 "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
452 "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
453 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
456 "PRIMARY" => ["url"],
457 "addr" => ["addr(32)"],
458 "alias" => ["alias(190)"],
459 "followers" => ["followers(190)"],
460 "baseurl" => ["baseurl(190)"],
461 "sharedinbox" => ["sharedinbox(190)"],
463 "uri-id" => ["UNIQUE", "uri-id"],
467 "comment" => "OAuth application",
469 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
470 "client_id" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
471 "client_secret" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
472 "name" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
473 "redirect_uri" => ["type" => "varbinary(383)", "not null" => "1", "comment" => ""],
474 "website" => ["type" => "varbinary(383)", "comment" => ""],
475 "scopes" => ["type" => "varchar(255)", "comment" => ""],
476 "read" => ["type" => "boolean", "comment" => "Read scope"],
477 "write" => ["type" => "boolean", "comment" => "Write scope"],
478 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
479 "push" => ["type" => "boolean", "comment" => "Push scope"],
483 "client_id" => ["UNIQUE", "client_id"]
486 "application-marker" => [
487 "comment" => "Timeline marker",
489 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
490 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
491 "timeline" => ["type" => "varchar(64)", "not null" => "1", "primary" => "1", "comment" => "Marker (home, notifications)"],
492 "last_read_id" => ["type" => "varbinary(383)", "comment" => "Marker id for the timeline"],
493 "version" => ["type" => "smallint unsigned", "comment" => "Version number"],
494 "updated_at" => ["type" => "datetime", "comment" => "creation time"],
497 "PRIMARY" => ["application-id", "uid", "timeline"],
501 "application-token" => [
502 "comment" => "OAuth user token",
504 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
505 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
506 "code" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
507 "access_token" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
508 "created_at" => ["type" => "datetime", "not null" => "1", "comment" => "creation time"],
509 "scopes" => ["type" => "varchar(255)", "comment" => ""],
510 "read" => ["type" => "boolean", "comment" => "Read scope"],
511 "write" => ["type" => "boolean", "comment" => "Write scope"],
512 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
513 "push" => ["type" => "boolean", "comment" => "Push scope"],
516 "PRIMARY" => ["application-id", "uid"],
517 "uid_id" => ["uid", "application-id"],
521 "comment" => "file attachments",
523 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
524 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
525 "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
526 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
527 "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
528 "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
529 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
530 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
531 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
532 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
533 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
534 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
535 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
536 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
537 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
545 "comment" => "Stores temporary data",
547 "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
548 "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
549 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
550 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
554 "k_expires" => ["k", "expires"],
558 "comment" => "main configuration storage",
560 "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => "The category of the entry"],
561 "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => "The key of the entry"],
562 "v" => ["type" => "mediumtext", "comment" => ""],
565 "PRIMARY" => ["cat", "k"],
568 "contact-relation" => [
569 "comment" => "Contact relations",
571 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "contact the related contact had interacted with"],
572 "relation-cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "related contact who had interacted with the contact"],
573 "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction"],
574 "follow-updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last update of the contact relationship"],
575 "follows" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
578 "PRIMARY" => ["cid", "relation-cid"],
579 "relation-cid" => ["relation-cid"],
583 "comment" => "private messages",
585 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
586 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
587 "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
588 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
589 "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
590 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
591 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
592 "subject" => ["type" => "text", "comment" => "subject of initial message"],
600 "comment" => "Background tasks queue entries",
602 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
603 "command" => ["type" => "varchar(100)", "comment" => "Task command"],
604 "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
605 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
606 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
607 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
608 "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
609 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
610 "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
611 "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
615 "command" => ["command"],
616 "done_command_parameter" => ["done", "command", "parameter(64)"],
617 "done_executed" => ["done", "executed"],
618 "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
619 "done_priority_next_try" => ["done", "priority", "next_try"],
620 "done_pid_next_try" => ["done", "pid", "next_try"],
621 "done_pid_retrial" => ["done", "pid", "retrial"],
622 "done_pid_priority_created" => ["done", "pid", "priority", "created"]
626 "comment" => "Posts that are about to be distributed at a later time",
628 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
629 "uri" => ["type" => "varbinary(383)", "comment" => "URI of the post that will be distributed later"],
630 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
631 "delayed" => ["type" => "datetime", "comment" => "delay time"],
632 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"],
636 "uid_uri" => ["UNIQUE", "uid", "uri(190)"],
640 "delivery-queue" => [
641 "comment" => "Delivery data for posts for the batch processing",
643 "gsid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Target server"],
644 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Delivered post"],
645 "created" => ["type" => "datetime", "comment" => ""],
646 "command" => ["type" => "varbinary(32)", "comment" => ""],
647 "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Target contact"],
648 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
649 "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
652 "PRIMARY" => ["uri-id", "gsid"],
653 "gsid_created" => ["gsid", "created"],
658 "diaspora-contact" => [
659 "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
661 "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"],
662 "addr" => ["type" => "varchar(255)", "comment" => ""],
663 "alias" => ["type" => "varchar(255)", "comment" => ""],
664 "nick" => ["type" => "varchar(255)", "comment" => ""],
665 "name" => ["type" => "varchar(255)", "comment" => ""],
666 "given-name" => ["type" => "varchar(255)", "comment" => ""],
667 "family-name" => ["type" => "varchar(255)", "comment" => ""],
668 "photo" => ["type" => "varchar(255)", "comment" => ""],
669 "photo-medium" => ["type" => "varchar(255)", "comment" => ""],
670 "photo-small" => ["type" => "varchar(255)", "comment" => ""],
671 "batch" => ["type" => "varchar(255)", "comment" => ""],
672 "notify" => ["type" => "varchar(255)", "comment" => ""],
673 "poll" => ["type" => "varchar(255)", "comment" => ""],
674 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
675 "searchable" => ["type" => "boolean", "comment" => ""],
676 "pubkey" => ["type" => "text", "comment" => ""],
677 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
678 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
679 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
680 "interacting_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts this contact interactes with"],
681 "interacted_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts that interacted with this contact"],
682 "post_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts and comments"],
685 "PRIMARY" => ["uri-id"],
686 "addr" => ["UNIQUE", "addr"],
687 "alias" => ["alias"],
691 "diaspora-interaction" => [
692 "comment" => "Signed Diaspora Interaction",
694 "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"],
695 "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
698 "PRIMARY" => ["uri-id"]
702 "comment" => "ActivityPub endpoints - used in the ActivityPub implementation",
704 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
705 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
706 "owner-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
709 "PRIMARY" => ["url"],
710 "owner-uri-id_type" => ["UNIQUE", "owner-uri-id", "type"],
714 "comment" => "Events",
716 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
717 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
718 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
719 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
720 "uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
721 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the event uri"],
722 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
723 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
724 "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
725 "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
726 "summary" => ["type" => "text", "comment" => "short description or title of the event"],
727 "desc" => ["type" => "text", "comment" => "event description"],
728 "location" => ["type" => "text", "comment" => "event location"],
729 "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
730 "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
731 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
732 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
733 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
734 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
735 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
739 "uid_start" => ["uid", "start"],
741 "uri-id" => ["uri-id"],
747 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
748 "url" => ["type" => "varbinary(383)", "comment" => "url that awaiting to be fetched"],
749 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of the fetch request"],
750 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"], ],
753 "url" => ["UNIQUE", "url"],
754 "created" => ["created"],
759 "comment" => "friend suggestion stuff",
761 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
762 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
763 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
764 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
765 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
766 "request" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
767 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
768 "note" => ["type" => "text", "comment" => ""],
769 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
778 "comment" => "privacy groups, group info",
780 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
781 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
782 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
783 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
784 "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Contact id of forum. When this field is filled then the members are synced automatically."],
785 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
794 "comment" => "privacy groups, member info",
796 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
797 "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "groups.id of the associated group"],
798 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
802 "contactid" => ["contact-id"],
803 "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
807 "comment" => "Tags that the server has subscribed",
809 "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["gserver" => "id"], "primary" => "1",
810 "comment" => "The id of the gserver"],
811 "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
814 "PRIMARY" => ["gserver-id", "tag"],
819 "comment" => "addon hook registry",
821 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
822 "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
823 "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
824 "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
825 "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"],
829 "priority" => ["priority"],
830 "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
834 "comment" => "Incoming activity",
836 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
837 "activity-id" => ["type" => "varbinary(383)", "comment" => "id of the incoming activity"],
838 "object-id" => ["type" => "varbinary(383)", "comment" => ""],
839 "in-reply-to-id" => ["type" => "varbinary(383)", "comment" => ""],
840 "conversation" => ["type" => "varbinary(383)", "comment" => ""],
841 "type" => ["type" => "varchar(64)", "comment" => "Type of the activity"],
842 "object-type" => ["type" => "varchar(64)", "comment" => "Type of the object activity"],
843 "object-object-type" => ["type" => "varchar(64)", "comment" => "Type of the object's object activity"],
844 "received" => ["type" => "datetime", "comment" => "Receiving date"],
845 "activity" => ["type" => "mediumtext", "comment" => "The JSON activity"],
846 "signer" => ["type" => "varchar(255)", "comment" => ""],
847 "push" => ["type" => "boolean", "comment" => "Is the entry pushed or have pulled it?"],
848 "trust" => ["type" => "boolean", "comment" => "Do we trust this entry?"],
849 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"], ],
852 "activity-id" => ["UNIQUE", "activity-id"],
853 "object-id" => ["object-id"],
854 "received" => ["received"],
858 "inbox-entry-receiver" => [
859 "comment" => "Receiver for the incoming activity",
861 "queue-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["inbox-entry" => "id"], "comment" => ""],
862 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
865 "PRIMARY" => ["queue-id", "uid"],
870 "comment" => "Status of ActivityPub inboxes",
872 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
873 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
874 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "ID of the related server"],
875 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
876 "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
877 "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
878 "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
879 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
880 "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
883 "PRIMARY" => ["url"],
884 "uri-id" => ["uri-id"],
891 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
892 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
893 "fid" => ["type" => "int unsigned", "comment" => "deprecated"],
894 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
895 "suggest-cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Suggested contact"],
896 "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
897 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
898 "note" => ["type" => "text", "comment" => ""],
899 "hash" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
900 "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
901 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
902 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
906 "contact-id" => ["contact-id"],
907 "suggest-cid" => ["suggest-cid"],
912 "comment" => "A key value storage",
914 "k" => ["type" => "varbinary(50)", "not null" => "1", "primary" => "1", "comment" => ""],
915 "v" => ["type" => "mediumtext", "comment" => ""],
916 "updated_at" => ["type" => "int unsigned", "not null" => "1", "comment" => "timestamp of the last update"],
925 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
926 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
927 "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
928 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
929 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
933 "name_expires" => ["name", "expires"]
937 "comment" => "private messages",
939 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
940 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
941 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
942 "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
943 "from-photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
944 "from-url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
945 "contact-id" => ["type" => "varbinary(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"],
946 "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"],
947 "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"],
948 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
949 "body" => ["type" => "mediumtext", "comment" => ""],
950 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
951 "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
952 "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
953 "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
954 "uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
955 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related mail"],
956 "parent-uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
957 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related mail"],
958 "thr-parent" => ["type" => "varbinary(383)", "comment" => ""],
959 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
960 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
964 "uid_seen" => ["uid", "seen"],
965 "convid" => ["convid"],
966 "uri" => ["uri(64)"],
967 "parent-uri" => ["parent-uri(64)"],
968 "contactid" => ["contact-id(32)"],
969 "author-id" => ["author-id"],
970 "uri-id" => ["uri-id"],
971 "parent-uri-id" => ["parent-uri-id"],
972 "thr-parent-id" => ["thr-parent-id"],
976 "comment" => "Mail account data for fetching mails",
978 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
979 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
980 "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
981 "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
982 "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
983 "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
984 "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
985 "pass" => ["type" => "text", "comment" => ""],
986 "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
987 "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
988 "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
989 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
990 "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
998 "comment" => "table of accounts that can manage each other",
1000 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1001 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1002 "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1005 "PRIMARY" => ["id"],
1006 "uid_mid" => ["UNIQUE", "uid", "mid"],
1011 "comment" => "notifications",
1013 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1014 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1015 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1016 "type" => ["type" => "smallint unsigned", "comment" => ""],
1017 "actor-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the actor that caused the notification"],
1018 "target-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
1019 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1020 "created" => ["type" => "datetime", "comment" => ""],
1021 "seen" => ["type" => "boolean", "default" => "0", "comment" => "Seen on the desktop"],
1022 "dismissed" => ["type" => "boolean", "default" => "0", "comment" => "Dismissed via the API"],
1025 "PRIMARY" => ["id"],
1026 "uid_vid_type_actor-id_target-uri-id" => ["UNIQUE", "uid", "vid", "type", "actor-id", "target-uri-id"],
1028 "actor-id" => ["actor-id"],
1029 "target-uri-id" => ["target-uri-id"],
1030 "parent-uri-id" => ["parent-uri-id"],
1031 "seen_uid" => ["seen", "uid"],
1032 "uid_type_parent-uri-id_actor-id" => ["uid", "type", "parent-uri-id", "actor-id"],
1036 "comment" => "[Deprecated] User notifications",
1038 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1039 "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1040 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1041 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1042 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1043 "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1044 "msg" => ["type" => "mediumtext", "comment" => ""],
1045 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1046 "link" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1047 "iid" => ["type" => "int unsigned", "comment" => ""],
1048 "parent" => ["type" => "int unsigned", "comment" => ""],
1049 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
1050 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1051 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1052 "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
1053 "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
1054 "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
1055 "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
1058 "PRIMARY" => ["id"],
1059 "seen_uid_date" => ["seen", "uid", "date"],
1060 "uid_date" => ["uid", "date"],
1061 "uid_type_link" => ["uid", "type", "link(190)"],
1062 "uri-id" => ["uri-id"],
1063 "parent-uri-id" => ["parent-uri-id"],
1066 "notify-threads" => [
1069 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1070 "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["notify" => "id"], "comment" => ""],
1071 "master-parent-item" => ["type" => "int unsigned", "comment" => "Deprecated"],
1072 "master-parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1073 "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1074 "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"],
1075 "comment" => "User id"],
1078 "PRIMARY" => ["id"],
1079 "master-parent-uri-id" => ["master-parent-uri-id"],
1080 "receiver-uid" => ["receiver-uid"],
1081 "notify-id" => ["notify-id"],
1085 "comment" => "cache for OEmbed queries",
1087 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "page url"],
1088 "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
1089 "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
1090 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1093 "PRIMARY" => ["url", "maxwidth"],
1094 "created" => ["created"],
1097 "openwebauth-token" => [
1098 "comment" => "Store OpenWebAuth token to verify contacts",
1100 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1101 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id - currently unused"],
1102 "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
1103 "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
1104 "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1105 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1108 "PRIMARY" => ["id"],
1113 "comment" => "cache for 'parse_url' queries",
1115 "url_hash" => ["type" => "binary(64)", "not null" => "1", "primary" => "1", "comment" => "page url hash"],
1116 "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
1117 "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
1118 "url" => ["type" => "text", "not null" => "1", "comment" => "page url"],
1119 "content" => ["type" => "mediumtext", "comment" => "page data"],
1120 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1121 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of expiration"],
1124 "PRIMARY" => ["url_hash", "guessing", "oembed"],
1125 "created" => ["created"],
1126 "expires" => ["expires"],
1130 "comment" => "personal (per user) configuration storage",
1132 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Primary key"],
1133 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1134 "cat" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "Category"],
1135 "k" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "Key"],
1136 "v" => ["type" => "mediumtext", "comment" => "Value"],
1139 "PRIMARY" => ["id"],
1140 "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
1144 "comment" => "photo storage",
1146 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1147 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid", "on delete" => "restrict"], "comment" => "Owner User id"],
1148 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "contact.id"],
1149 "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
1150 "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
1151 "hash" => ["type" => "char(32)", "comment" => "hash value of the photo"],
1152 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
1153 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
1154 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1155 "desc" => ["type" => "text", "comment" => ""],
1156 "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
1157 "photo-type" => ["type" => "tinyint unsigned", "comment" => "User avatar, user banner, contact avatar, contact banner or default"],
1158 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1159 "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
1160 "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1161 "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1162 "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1163 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the photo"],
1164 "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
1165 "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1166 "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1167 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
1168 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
1169 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
1170 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
1171 "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"],
1172 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
1173 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
1174 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1177 "PRIMARY" => ["id"],
1178 "contactid" => ["contact-id"],
1179 "uid_contactid" => ["uid", "contact-id"],
1180 "uid_profile" => ["uid", "profile"],
1181 "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
1182 "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
1183 "resource-id" => ["resource-id"],
1184 "uid_photo-type" => ["uid", "photo-type"],
1188 "comment" => "Structure for all posts",
1190 "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"],
1191 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1192 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1193 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1194 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1195 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1196 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1197 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1198 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1199 "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"],
1200 "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"],
1201 "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"],
1202 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1203 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1204 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1205 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1206 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1207 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"]
1210 "PRIMARY" => ["uri-id"],
1211 "parent-uri-id" => ["parent-uri-id"],
1212 "thr-parent-id" => ["thr-parent-id"],
1213 "external-id" => ["external-id"],
1214 "owner-id" => ["owner-id"],
1215 "author-id" => ["author-id"],
1216 "causer-id" => ["causer-id"],
1220 "post-activity" => [
1221 "comment" => "Original remote activity",
1223 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1224 "activity" => ["type" => "mediumtext", "comment" => "Original activity"],
1225 "received" => ["type" => "datetime", "comment" => ""],
1228 "PRIMARY" => ["uri-id"],
1231 "post-category" => [
1232 "comment" => "post relation to categories",
1234 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1235 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1236 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1237 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1240 "PRIMARY" => ["uri-id", "uid", "type", "tid"],
1242 "uid_uri-id" => ["uid", "uri-id"],
1245 "post-collection" => [
1246 "comment" => "Collection of posts",
1248 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1249 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "0 - Featured"],
1250 "author-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Author of the featured post"],
1253 "PRIMARY" => ["uri-id", "type"],
1255 "author-id" => ["author-id"],
1259 "comment" => "Content for all posts",
1261 "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"],
1262 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1263 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1264 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1265 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1266 "quote-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the quoted uri"],
1267 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1268 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1269 "language" => ["type" => "text", "comment" => "Language information about this post"],
1270 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1271 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1272 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1273 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1274 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1275 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1276 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1277 "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"],
1278 "plink" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1281 "PRIMARY" => ["uri-id"],
1282 "plink" => ["plink(191)"],
1283 "resource-id" => ["resource-id"],
1284 "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
1285 "quote-uri-id" => ["quote-uri-id"],
1288 "post-delivery" => [
1289 "comment" => "Delivery data for posts for the batch processing",
1291 "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"],
1292 "inbox-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
1293 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
1294 "created" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
1295 "command" => ["type" => "varbinary(32)", "comment" => ""],
1296 "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
1297 "receivers" => ["type" => "mediumtext", "comment" => "JSON encoded array with the receiving contacts"],
1300 "PRIMARY" => ["uri-id", "inbox-id"],
1301 "inbox-id_created" => ["inbox-id", "created"],
1305 "post-delivery-data" => [
1306 "comment" => "Delivery data for items",
1308 "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"],
1309 "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"],
1310 "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
1311 "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
1312 "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
1313 "queue_failed" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of unsuccessful deliveries, used as item.delivery_queue_failed"],
1314 "activitypub" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via ActivityPub"],
1315 "dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via DFRN"],
1316 "legacy_dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via legacy DFRN"],
1317 "diaspora" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via Diaspora"],
1318 "ostatus" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via OStatus"],
1321 "PRIMARY" => ["uri-id"],
1325 "comment" => "Post history",
1327 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1328 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "primary" => "1", "comment" => "Date of edit"],
1329 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1330 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1331 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1332 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1333 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1334 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1335 "language" => ["type" => "text", "comment" => "Language information about this post"],
1336 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1337 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1338 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1339 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1340 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1341 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1342 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1343 "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"],
1344 "plink" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1347 "PRIMARY" => ["uri-id", "edited"],
1351 "comment" => "Post related external links",
1353 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1354 "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"],
1355 "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "External URL"],
1356 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1357 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1358 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1359 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the link"],
1362 "PRIMARY" => ["id"],
1363 "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1367 "comment" => "Attached media",
1369 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1370 "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"],
1371 "url" => ["type" => "varbinary(1024)", "not null" => "1", "comment" => "Media URL"],
1372 "media-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the activities uri-id"],
1373 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
1374 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1375 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1376 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1377 "size" => ["type" => "bigint unsigned", "comment" => "Media size"],
1378 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the image"],
1379 "preview" => ["type" => "varbinary(512)", "comment" => "Preview URL"],
1380 "preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
1381 "preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
1382 "description" => ["type" => "text", "comment" => ""],
1383 "name" => ["type" => "varchar(255)", "comment" => "Name of the media"],
1384 "author-url" => ["type" => "varbinary(383)", "comment" => "URL of the author of the media"],
1385 "author-name" => ["type" => "varchar(255)", "comment" => "Name of the author of the media"],
1386 "author-image" => ["type" => "varbinary(383)", "comment" => "Image of the author of the media"],
1387 "publisher-url" => ["type" => "varbinary(383)", "comment" => "URL of the publisher of the media"],
1388 "publisher-name" => ["type" => "varchar(255)", "comment" => "Name of the publisher of the media"],
1389 "publisher-image" => ["type" => "varbinary(383)", "comment" => "Image of the publisher of the media"],
1392 "PRIMARY" => ["id"],
1393 "uri-id-url" => ["UNIQUE", "uri-id", "url(512)"],
1394 "uri-id-id" => ["uri-id", "id"],
1395 "media-uri-id" => ["media-uri-id"],
1398 "post-question" => [
1399 "comment" => "Question",
1401 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1402 "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"],
1403 "multiple" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Multiple choice"],
1404 "voters" => ["type" => "int unsigned", "comment" => "Number of voters for this question"],
1405 "end-time" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Question end time"],
1408 "PRIMARY" => ["id"],
1409 "uri-id" => ["UNIQUE", "uri-id"],
1412 "post-question-option" => [
1413 "comment" => "Question option",
1415 "id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "Id of the question"],
1416 "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"],
1417 "name" => ["type" => "varchar(255)", "comment" => "Name of the option"],
1418 "replies" => ["type" => "int unsigned", "comment" => "Number of replies for this question option"],
1421 "PRIMARY" => ["uri-id", "id"],
1425 "comment" => "post relation to tags",
1427 "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"],
1428 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1429 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1430 "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"],
1433 "PRIMARY" => ["uri-id", "type", "tid", "cid"],
1439 "comment" => "Thread related data",
1441 "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"],
1442 "conversation-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the conversation uri"],
1443 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1444 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1445 "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"],
1446 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1447 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1448 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1449 "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"],
1450 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1453 "PRIMARY" => ["uri-id"],
1454 "conversation-id" => ["conversation-id"],
1455 "owner-id" => ["owner-id"],
1456 "author-id" => ["author-id"],
1457 "causer-id" => ["causer-id"],
1458 "received" => ["received"],
1459 "commented" => ["commented"],
1463 "comment" => "User specific post data",
1465 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
1466 "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"],
1467 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1468 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1469 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1470 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1471 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1472 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1473 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1474 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1475 "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"],
1476 "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"],
1477 "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"],
1478 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1479 "post-reason" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Reason why the post arrived at the user"],
1480 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1481 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1482 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1483 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1484 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"],
1485 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1486 "protocol" => ["type" => "tinyint unsigned", "comment" => "Protocol used to deliver the item for this user"],
1487 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1488 "event-id" => ["type" => "int unsigned", "foreign" => ["event" => "id"], "comment" => "Used to link to the event.id"],
1489 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1490 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1491 "notification-type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1492 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1493 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1494 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1497 "PRIMARY" => ["id"],
1498 "uid_uri-id" => ["UNIQUE", "uid", "uri-id"],
1499 "uri-id" => ["uri-id"],
1500 "parent-uri-id" => ["parent-uri-id"],
1501 "thr-parent-id" => ["thr-parent-id"],
1502 "external-id" => ["external-id"],
1503 "owner-id" => ["owner-id"],
1504 "author-id" => ["author-id"],
1505 "causer-id" => ["causer-id"],
1507 "contact-id" => ["contact-id"],
1508 "event-id" => ["event-id"],
1510 "author-id_uid" => ["author-id", "uid"],
1511 "author-id_received" => ["author-id", "received"],
1512 "parent-uri-id_uid" => ["parent-uri-id", "uid"],
1513 "uid_wall_received" => ["uid", "wall", "received"],
1514 "uid_contactid" => ["uid", "contact-id"],
1515 "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
1516 "uid_unseen" => ["uid", "unseen"],
1517 "uid_hidden_uri-id" => ["uid", "hidden", "uri-id"],
1520 "post-thread-user" => [
1521 "comment" => "Thread related data per user",
1523 "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"],
1524 "conversation-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the conversation uri"],
1525 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1526 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1527 "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"],
1528 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1529 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1530 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1531 "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"],
1532 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1533 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1534 "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
1535 "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1536 "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"],
1537 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1538 "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1539 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1540 "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
1541 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1542 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1543 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1544 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1545 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1546 "post-user-id" => ["type" => "int unsigned", "foreign" => ["post-user" => "id"], "comment" => "Id of the post-user table"],
1549 "PRIMARY" => ["uid", "uri-id"],
1550 "uri-id" => ["uri-id"],
1551 "conversation-id" => ["conversation-id"],
1552 "owner-id" => ["owner-id"],
1553 "author-id" => ["author-id"],
1554 "causer-id" => ["causer-id"],
1556 "contact-id" => ["contact-id"],
1558 "post-user-id" => ["post-user-id"],
1559 "commented" => ["commented"],
1560 "uid_received" => ["uid", "received"],
1561 "uid_wall_received" => ["uid", "wall", "received"],
1562 "uid_commented" => ["uid", "commented"],
1563 "uid_starred" => ["uid", "starred"],
1564 "uid_mention" => ["uid", "mention"],
1567 "post-user-notification" => [
1568 "comment" => "User post notifications",
1570 "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"],
1571 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1572 "notification-type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1575 "PRIMARY" => ["uid", "uri-id"],
1576 "uri-id" => ["uri-id"],
1580 "comment" => "Currently running system processes",
1582 "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "The ID of the process"],
1583 "hostname" => ["type" => "varchar(32)", "not null" => "1", "primary" => "1", "comment" => "The name of the host the process is ran on"],
1584 "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
1585 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1588 "PRIMARY" => ["pid", "hostname"],
1589 "command" => ["command"],
1593 "comment" => "user profiles data",
1595 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1596 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1597 "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1598 "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
1599 "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
1600 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1601 "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1602 "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
1603 "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1604 "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1605 "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1606 "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1607 "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1608 "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1609 "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
1610 "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1611 "with" => ["type" => "text", "comment" => "Deprecated"],
1612 "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
1613 "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1614 "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1615 "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1616 "pub_keywords" => ["type" => "text", "comment" => ""],
1617 "prv_keywords" => ["type" => "text", "comment" => ""],
1618 "likes" => ["type" => "text", "comment" => "Deprecated"],
1619 "dislikes" => ["type" => "text", "comment" => "Deprecated"],
1620 "about" => ["type" => "text", "comment" => "Profile description"],
1621 "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1622 "music" => ["type" => "text", "comment" => "Deprecated"],
1623 "book" => ["type" => "text", "comment" => "Deprecated"],
1624 "tv" => ["type" => "text", "comment" => "Deprecated"],
1625 "film" => ["type" => "text", "comment" => "Deprecated"],
1626 "interest" => ["type" => "text", "comment" => "Deprecated"],
1627 "romance" => ["type" => "text", "comment" => "Deprecated"],
1628 "work" => ["type" => "text", "comment" => "Deprecated"],
1629 "education" => ["type" => "text", "comment" => "Deprecated"],
1630 "contact" => ["type" => "text", "comment" => "Deprecated"],
1631 "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1632 "homepage_verified" => ["type" => "boolean", "not null" => 1, "default" => "0", "comment" => "was the homepage verified by a rel-me link back to the profile"],
1633 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
1634 "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
1635 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1636 "thumb" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1637 "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
1638 "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
1641 "PRIMARY" => ["id"],
1642 "uid_is-default" => ["uid", "is-default"],
1643 "pub_keywords" => ["FULLTEXT", "pub_keywords"],
1646 "profile_field" => [
1647 "comment" => "Custom profile fields",
1649 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1650 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner user id"],
1651 "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
1652 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this profile field - 0 = public"],
1653 "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
1654 "value" => ["type" => "text", "comment" => "Value of the field"],
1655 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
1656 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
1659 "PRIMARY" => ["id"],
1661 "order" => ["order"],
1665 "push_subscriber" => [
1666 "comment" => "Used for OStatus: Contains feed subscribers",
1668 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1669 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1670 "callback_url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1671 "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1672 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1673 "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1674 "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
1675 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1676 "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
1677 "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1680 "PRIMARY" => ["id"],
1681 "next_try" => ["next_try"],
1686 "comment" => "registrations requiring admin approval",
1688 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1689 "hash" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1690 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1691 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1692 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1693 "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1694 "note" => ["type" => "text", "comment" => ""],
1697 "PRIMARY" => ["id"],
1704 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1705 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Reporting user"],
1706 "reporter-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Reporting contact"],
1707 "cid" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["contact" => "id"], "comment" => "Reported contact"],
1708 "comment" => ["type" => "text", "comment" => "Report"],
1709 "category" => ["type" => "varchar(20)", "comment" => "Category of the report (spam, violation, other)"],
1710 "rules" => ["type" => "text", "comment" => "Violated rules"],
1711 "forward" => ["type" => "boolean", "comment" => "Forward the report to the remote server"],
1712 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1713 "status" => ["type" => "tinyint unsigned", "comment" => "Status of the report"],
1716 "PRIMARY" => ["id"],
1719 "reporter-id" => ["reporter-id"],
1725 "rid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["report" => "id"], "comment" => "Report id"],
1726 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Uri-id of the reported post"],
1727 "status" => ["type" => "tinyint unsigned", "comment" => "Status of the reported post"],
1730 "PRIMARY" => ["rid", "uri-id"],
1731 "uri-id" => ["uri-id"],
1737 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1738 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1739 "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1742 "PRIMARY" => ["id"],
1743 "uid_term" => ["uid", "term(64)"],
1744 "term" => ["term(64)"]
1748 "comment" => "web session storage",
1750 "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1751 "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1752 "data" => ["type" => "text", "comment" => ""],
1753 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1756 "PRIMARY" => ["id"],
1757 "sid" => ["sid(64)"],
1758 "expire" => ["expire"],
1762 "comment" => "Data stored by Database storage backend",
1764 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1765 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]
1772 "comment" => "Push Subscription for the API",
1774 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1775 "application-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["application" => "id"], "comment" => ""],
1776 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1777 "endpoint" => ["type" => "varchar(511)", "comment" => "Endpoint URL"],
1778 "pubkey" => ["type" => "varchar(127)", "comment" => "User agent public key"],
1779 "secret" => ["type" => "varchar(32)", "comment" => "Auth secret"],
1780 "follow" => ["type" => "boolean", "comment" => ""],
1781 "favourite" => ["type" => "boolean", "comment" => ""],
1782 "reblog" => ["type" => "boolean", "comment" => ""],
1783 "mention" => ["type" => "boolean", "comment" => ""],
1784 "poll" => ["type" => "boolean", "comment" => ""],
1785 "follow_request" => ["type" => "boolean", "comment" => ""],
1786 "status" => ["type" => "boolean", "comment" => ""],
1789 "PRIMARY" => ["id"],
1790 "application-id_uid" => ["UNIQUE", "application-id", "uid"],
1791 "uid_application-id" => ["uid", "application-id"],
1795 "comment" => "Deleted usernames",
1797 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1798 "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
1801 "PRIMARY" => ["id"],
1802 "username" => ["username(32)"],
1806 "comment" => "User specific public contact data",
1808 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
1809 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1810 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
1811 "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
1812 "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
1813 "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"],
1814 "hidden" => ["type" => "boolean", "comment" => "This contact is hidden from the others"],
1815 "is-blocked" => ["type" => "boolean", "comment" => "User is blocked by this contact"],
1816 "pending" => ["type" => "boolean", "comment" => ""],
1817 "rel" => ["type" => "tinyint unsigned", "comment" => "The kind of the relation between the user and the contact"],
1818 "info" => ["type" => "mediumtext", "comment" => ""],
1819 "notify_new_posts" => ["type" => "boolean", "comment" => ""],
1820 "remote_self" => ["type" => "boolean", "comment" => ""],
1821 "fetch_further_information" => ["type" => "tinyint unsigned", "comment" => ""],
1822 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
1823 "subhub" => ["type" => "boolean", "comment" => ""],
1824 "hub-verify" => ["type" => "varbinary(383)", "comment" => ""],
1825 "protocol" => ["type" => "char(4)", "comment" => "Protocol of the contact"],
1826 "rating" => ["type" => "tinyint", "comment" => "Automatically detected feed poll frequency"],
1827 "priority" => ["type" => "tinyint unsigned", "comment" => "Feed poll priority"],
1830 "PRIMARY" => ["uid", "cid"],
1832 "uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
1835 "arrived-activity" => [
1836 "comment" => "Id of arrived activities",
1838 "object-id" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "object id of the incoming activity"],
1839 "received" => ["type" => "datetime", "comment" => "Receiving date"],
1842 "PRIMARY" => ["object-id"],
1844 "engine" => "MEMORY",
1846 "fetched-activity" => [
1847 "comment" => "Id of fetched activities",
1849 "object-id" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "object id of fetched activity"],
1850 "received" => ["type" => "datetime", "comment" => "Receiving date"],
1853 "PRIMARY" => ["object-id"],
1855 "engine" => "MEMORY",
1858 "comment" => "Inter process communication between the frontend and the worker",
1860 "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
1861 "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
1864 "PRIMARY" => ["key"],
1866 "engine" => "MEMORY",