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 // This file is required several times during the test in DbaDefinition which justifies this condition
58 if (!defined('DB_UPDATE_VERSION')) {
59 define('DB_UPDATE_VERSION', 1535);
65 "comment" => "Global servers",
67 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
68 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
69 "nurl" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
70 "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
71 "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
72 "info" => ["type" => "text", "comment" => ""],
73 "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
74 "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
75 "active-week-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last week"],
76 "active-month-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last month"],
77 "active-halfyear-users" => ["type" => "int unsigned", "comment" => "Number of active users in the last six month"],
78 "local-posts" => ["type" => "int unsigned", "comment" => "Number of local posts"],
79 "local-comments" => ["type" => "int unsigned", "comment" => "Number of local comments"],
80 "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
81 "poco" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
82 "noscrape" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
83 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
84 "protocol" => ["type" => "tinyint unsigned", "comment" => "The protocol of the server"],
85 "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
86 "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
87 "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
88 "detection-method" => ["type" => "tinyint unsigned", "comment" => "Method that had been used to detect that server"],
89 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
90 "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
91 "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last successful connection request"],
92 "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last failed connection request"],
93 "blocked" => ["type" => "boolean", "comment" => "Server is blocked"],
94 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
95 "next_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Next connection request"],
99 "nurl" => ["UNIQUE", "nurl(190)"],
100 "next_contact" => ["next_contact"],
101 "network" => ["network"],
105 "comment" => "The local users",
107 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
108 "parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "The parent user that has full control about this user"],
109 "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
110 "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
111 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
112 "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
113 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
114 "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
115 "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
116 "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
117 "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
118 "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
119 "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
120 "last-activity" => ["type" => "date", "comment" => "Day of the last activity"],
121 "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
122 "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
123 "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
124 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
125 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
126 "spubkey" => ["type" => "text", "comment" => ""],
127 "sprvkey" => ["type" => "text", "comment" => ""],
128 "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
129 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
130 "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
131 "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unknown viewers"],
132 "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
133 "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
134 "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
135 "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
136 "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
137 "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
138 "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
139 "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
140 "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
141 "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
142 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Delay in days before deleting user-related posts. Scope is controlled by pConfig."],
143 "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
144 "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
145 "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
146 "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
147 "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
148 "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
149 "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
150 "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
151 "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
152 "openidserver" => ["type" => "text", "comment" => ""],
155 "PRIMARY" => ["uid"],
156 "nickname" => ["nickname(32)"],
157 "parent-uid" => ["parent-uid"],
159 "email" => ["email(64)"],
163 "comment" => "User settings about remote servers",
165 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "primary" => "1", "comment" => "Owner User id"],
166 "gsid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["gserver" => "id"], "primary" => "1", "comment" => "Gserver id"],
167 "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "server accounts are ignored for the user"],
170 "PRIMARY" => ["uid", "gsid"],
175 "comment" => "URI and GUID for items",
177 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
178 "uri" => ["type" => "varbinary(383)", "not null" => "1", "comment" => "URI of an item"],
179 "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
183 "uri" => ["UNIQUE", "uri"],
188 "comment" => "contact table",
190 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
191 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
192 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
193 "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"],
194 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network of the contact"],
195 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
196 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
197 "location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
198 "about" => ["type" => "text", "comment" => ""],
199 "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
200 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
201 "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
202 "avatar" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
203 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the avatar"],
204 "header" => ["type" => "varbinary(383)", "comment" => "Header picture"],
205 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
206 "nurl" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
207 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
208 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
209 "alias" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
210 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
211 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
212 "batch" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
213 "notify" => ["type" => "varbinary(383)", "comment" => ""],
214 "poll" => ["type" => "varbinary(383)", "comment" => ""],
215 "subscribe" => ["type" => "varbinary(383)", "comment" => ""],
216 "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
217 "next-update" => ["type" => "datetime", "comment" => "Next connection request"],
218 "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
219 "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
220 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
221 "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
222 "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
223 "last-discovery" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last follower discovery"],
224 "local-data" => ["type" => "boolean", "comment" => "Is true when there are posts with this contact on the system"],
225 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Node-wide block status"],
226 "block_reason" => ["type" => "text", "comment" => "Node-wide block reason"],
227 "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
228 "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Person, organisation, news, community, relay"],
229 "manually-approve" => ["type" => "boolean", "comment" => "Contact requests have to be approved manually"],
230 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
231 "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"],
232 "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"],
233 "baseurl" => ["type" => "varbinary(383)", "default" => "", "comment" => "baseurl of the contact from the gserver record, can be missing"],
234 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID, can be missing"],
235 "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
236 // User depending fields
237 "reason" => ["type" => "text", "comment" => ""],
238 "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
239 "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
240 "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
241 "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"],
242 "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
243 "hub-verify" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
244 "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Automatically detected feed poll frequency"],
245 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Feed poll priority"],
246 "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
247 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
248 "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Contact request is pending"],
249 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
250 "info" => ["type" => "mediumtext", "comment" => ""],
251 "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
252 "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
253 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
254 // Deprecated, but still in use
255 "photo" => ["type" => "varbinary(383)", "default" => "", "comment" => "Link to the profile photo of the contact"],
256 "thumb" => ["type" => "varbinary(383)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
257 "micro" => ["type" => "varbinary(383)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
258 "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
259 "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
260 "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
261 "request" => ["type" => "varbinary(383)", "comment" => ""],
262 "confirm" => ["type" => "varbinary(383)", "comment" => ""],
263 "poco" => ["type" => "varbinary(383)", "comment" => ""],
264 "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
265 "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a group. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = false instead"],
266 "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = true instead"],
267 "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
268 // Deprecated fields that aren't in use anymore
269 "site-pubkey" => ["type" => "text", "comment" => "Deprecated"],
270 "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
271 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
272 "issued-id" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
273 "dfrn-id" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
274 "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
275 "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
276 "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
277 "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => "Deprecated"],
278 "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
282 "uid_name" => ["uid", "name(190)"],
283 "self_uid" => ["self", "uid"],
284 "alias_uid" => ["alias(128)", "uid"],
285 "pending_uid" => ["pending", "uid"],
286 "blocked_uid" => ["blocked", "uid"],
287 "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
288 "uid_network_batch" => ["uid", "network", "batch(64)"],
289 "batch_contact-type" => ["batch(64)", "contact-type"],
290 "addr_uid" => ["addr(128)", "uid"],
291 "nurl_uid" => ["nurl(128)", "uid"],
292 "nick_uid" => ["nick(128)", "uid"],
293 "attag_uid" => ["attag(96)", "uid"],
294 "network_uid_lastupdate" => ["network", "uid", "last-update"],
295 "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
296 "next-update" => ["next-update"],
297 "local-data-next-update" => ["local-data", "next-update"],
298 "uid_lastitem" => ["uid", "last-item"],
299 "baseurl" => ["baseurl(64)"],
300 "uid_contact-type" => ["uid", "contact-type"],
301 "uid_self_contact-type" => ["uid", "self", "contact-type"],
302 "self_network_uid" => ["self", "network", "uid"],
303 "gsid_uid_failed" => ["gsid", "uid", "failed"],
304 "uri-id" => ["uri-id"],
308 "comment" => "tags and mentions",
310 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
311 "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
312 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
313 "type" => ["type" => "tinyint unsigned", "comment" => "Type of the tag (Unknown, General Collection, Follower Collection or Account)"],
317 "type_name_url" => ["UNIQUE", "name", "url"],
324 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
325 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
326 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
327 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed circles"],
328 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
329 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied circles"],
333 "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["uid", "allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
337 "comment" => "Activity Verbs",
339 "id" => ["type" => "smallint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
340 "name" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""]
348 "2fa_app_specific_password" => [
349 "comment" => "Two-factor app-specific _password",
351 "id" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Password ID for revocation"],
352 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
353 "description" => ["type" => "varchar(255)", "comment" => "Description of the usage of the password"],
354 "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "comment" => "Hashed password"],
355 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the password was generated"],
356 "last_used" => ["type" => "datetime", "comment" => "Datetime the password was last used"],
360 "uid_description" => ["uid", "description(190)"],
363 "2fa_recovery_codes" => [
364 "comment" => "Two-factor authentication recovery codes",
366 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
367 "code" => ["type" => "varchar(50)", "not null" => "1", "primary" => "1", "comment" => "Recovery code string"],
368 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the code was generated"],
369 "used" => ["type" => "datetime", "comment" => "Datetime the code was used"],
372 "PRIMARY" => ["uid", "code"]
375 "2fa_trusted_browser" => [
376 "comment" => "Two-factor authentication trusted browsers",
378 "cookie_hash" => ["type" => "varchar(80)", "not null" => "1", "primary" => "1", "comment" => "Trusted cookie hash"],
379 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
380 "user_agent" => ["type" => "text", "comment" => "User agent string"],
381 "trusted" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Whenever this browser should be trusted or not"],
382 "created" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the trusted browser was recorded"],
383 "last_used" => ["type" => "datetime", "comment" => "Datetime the trusted browser was last used"],
386 "PRIMARY" => ["cookie_hash"],
390 "account-suggestion" => [
391 "comment" => "Account suggestion",
393 "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"],
394 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
395 "level" => ["type" => "smallint unsigned", "comment" => "level of closeness"],
396 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "If set, this account will not be suggested again"],
399 "PRIMARY" => ["uid", "uri-id"],
400 "uri-id_uid" => ["uri-id", "uid"],
404 "comment" => "Remote and local accounts",
406 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
407 "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"],
408 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
412 "uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
413 "uid_uri-id" => ["uid", "uri-id"],
417 "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
419 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
420 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
421 "uuid" => ["type" => "varbinary(255)", "comment" => ""],
422 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
423 "following" => ["type" => "varbinary(383)", "comment" => ""],
424 "followers" => ["type" => "varbinary(383)", "comment" => ""],
425 "inbox" => ["type" => "varbinary(383)", "not null" => "1", "comment" => ""],
426 "outbox" => ["type" => "varbinary(383)", "comment" => ""],
427 "sharedinbox" => ["type" => "varbinary(383)", "comment" => ""],
428 "featured" => ["type" => "varbinary(383)", "comment" => "Address for the collection of featured posts"],
429 "featured-tags" => ["type" => "varbinary(383)", "comment" => "Address for the collection of featured tags"],
430 "manually-approve" => ["type" => "boolean", "comment" => ""],
431 "discoverable" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is published in their directory"],
432 "suspended" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is suspended"],
433 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
434 "name" => ["type" => "varchar(255)", "comment" => ""],
435 "about" => ["type" => "text", "comment" => ""],
436 "xmpp" => ["type" => "varchar(255)", "comment" => "XMPP address"],
437 "matrix" => ["type" => "varchar(255)", "comment" => "Matrix address"],
438 "photo" => ["type" => "varbinary(383)", "comment" => ""],
439 "header" => ["type" => "varbinary(383)", "comment" => "Header picture"],
440 "addr" => ["type" => "varchar(255)", "comment" => ""],
441 "alias" => ["type" => "varbinary(383)", "comment" => ""],
442 "pubkey" => ["type" => "text", "comment" => ""],
443 "subscribe" => ["type" => "varbinary(383)", "comment" => ""],
444 "baseurl" => ["type" => "varbinary(383)", "comment" => "baseurl of the ap contact"],
445 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
446 "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
447 "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
448 "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
449 "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
450 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
453 "PRIMARY" => ["url"],
454 "addr" => ["addr(32)"],
455 "alias" => ["alias(190)"],
456 "followers" => ["followers(190)"],
457 "baseurl" => ["baseurl(190)"],
458 "sharedinbox" => ["sharedinbox(190)"],
460 "uri-id" => ["UNIQUE", "uri-id"],
464 "comment" => "OAuth application",
466 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
467 "client_id" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
468 "client_secret" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
469 "name" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
470 "redirect_uri" => ["type" => "varbinary(383)", "not null" => "1", "comment" => ""],
471 "website" => ["type" => "varbinary(383)", "comment" => ""],
472 "scopes" => ["type" => "varchar(255)", "comment" => ""],
473 "read" => ["type" => "boolean", "comment" => "Read scope"],
474 "write" => ["type" => "boolean", "comment" => "Write scope"],
475 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
476 "push" => ["type" => "boolean", "comment" => "Push scope"],
480 "client_id" => ["UNIQUE", "client_id"]
483 "application-marker" => [
484 "comment" => "Timeline marker",
486 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
487 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
488 "timeline" => ["type" => "varchar(64)", "not null" => "1", "primary" => "1", "comment" => "Marker (home, notifications)"],
489 "last_read_id" => ["type" => "varbinary(383)", "comment" => "Marker id for the timeline"],
490 "version" => ["type" => "smallint unsigned", "comment" => "Version number"],
491 "updated_at" => ["type" => "datetime", "comment" => "creation time"],
494 "PRIMARY" => ["application-id", "uid", "timeline"],
498 "application-token" => [
499 "comment" => "OAuth user token",
501 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
502 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
503 "code" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
504 "access_token" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
505 "created_at" => ["type" => "datetime", "not null" => "1", "comment" => "creation time"],
506 "scopes" => ["type" => "varchar(255)", "comment" => ""],
507 "read" => ["type" => "boolean", "comment" => "Read scope"],
508 "write" => ["type" => "boolean", "comment" => "Write scope"],
509 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
510 "push" => ["type" => "boolean", "comment" => "Push scope"],
513 "PRIMARY" => ["application-id", "uid"],
514 "uid_id" => ["uid", "application-id"],
518 "comment" => "file attachments",
520 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
521 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
522 "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
523 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
524 "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
525 "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
526 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
527 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
528 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
529 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
530 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed circles"],
531 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
532 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied circles"],
533 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
534 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
542 "comment" => "Stores temporary data",
544 "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
545 "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
546 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
547 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
551 "k_expires" => ["k", "expires"],
555 "comment" => "User defined Channels",
557 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
558 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
559 "label" => ["type" => "varchar(64)", "not null" => "1", "comment" => "Channel label"],
560 "description" => ["type" => "varchar(64)", "comment" => "Channel description"],
561 "access-key" => ["type" => "varchar(1)", "comment" => "Access key"],
562 "include-tags" => ["type" => "varchar(255)", "comment" => "Comma separated list of tags that will be included in the channel"],
563 "exclude-tags" => ["type" => "varchar(255)", "comment" => "Comma separated list of tags that aren't allowed in the channel"],
564 "full-text-search" => ["type" => "varchar(255)", "comment" => "Full text search pattern, see https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode"],
565 "media-type" => ["type" => "smallint unsigned", "comment" => "Filtered media types"],
573 "comment" => "main configuration storage",
575 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
576 "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => "The category of the entry"],
577 "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => "The key of the entry"],
578 "v" => ["type" => "mediumtext", "comment" => ""],
582 "cat_k" => ["UNIQUE", "cat", "k"],
585 "contact-relation" => [
586 "comment" => "Contact relations",
588 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "contact the related contact had interacted with"],
589 "relation-cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "related contact who had interacted with the contact"],
590 "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction by relation-cid on cid"],
591 "follow-updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last update of the contact relationship"],
592 "follows" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if true, relation-cid follows cid"],
593 "score" => ["type" => "smallint unsigned", "comment" => "score for interactions of cid on relation-cid"],
594 "relation-score" => ["type" => "smallint unsigned", "comment" => "score for interactions of relation-cid on cid"],
595 "thread-score" => ["type" => "smallint unsigned", "comment" => "score for interactions of cid on threads of relation-cid"],
596 "relation-thread-score" => ["type" => "smallint unsigned", "comment" => "score for interactions of relation-cid on threads of cid"],
599 "PRIMARY" => ["cid", "relation-cid"],
600 "relation-cid" => ["relation-cid"],
604 "comment" => "private messages",
606 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
607 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
608 "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
609 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
610 "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
611 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
612 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
613 "subject" => ["type" => "text", "comment" => "subject of initial message"],
621 "comment" => "Background tasks queue entries",
623 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
624 "command" => ["type" => "varchar(100)", "comment" => "Task command"],
625 "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
626 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
627 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
628 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
629 "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
630 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
631 "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
632 "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
636 "command" => ["command"],
637 "done_command_parameter" => ["done", "command", "parameter(64)"],
638 "done_executed" => ["done", "executed"],
639 "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
640 "done_priority_next_try" => ["done", "priority", "next_try"],
641 "done_pid_next_try" => ["done", "pid", "next_try"],
642 "done_pid_retrial" => ["done", "pid", "retrial"],
643 "done_pid_priority_created" => ["done", "pid", "priority", "created"]
647 "comment" => "Posts that are about to be distributed at a later time",
649 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
650 "uri" => ["type" => "varbinary(383)", "comment" => "URI of the post that will be distributed later"],
651 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
652 "delayed" => ["type" => "datetime", "comment" => "delay time"],
653 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"],
657 "uid_uri" => ["UNIQUE", "uid", "uri(190)"],
661 "delivery-queue" => [
662 "comment" => "Delivery data for posts for the batch processing",
664 "gsid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Target server"],
665 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Delivered post"],
666 "created" => ["type" => "datetime", "comment" => ""],
667 "command" => ["type" => "varbinary(32)", "comment" => ""],
668 "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Target contact"],
669 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
670 "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
673 "PRIMARY" => ["uri-id", "gsid"],
674 "gsid_created" => ["gsid", "created"],
679 "diaspora-contact" => [
680 "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
682 "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"],
683 "addr" => ["type" => "varchar(255)", "comment" => ""],
684 "alias" => ["type" => "varchar(255)", "comment" => ""],
685 "nick" => ["type" => "varchar(255)", "comment" => ""],
686 "name" => ["type" => "varchar(255)", "comment" => ""],
687 "given-name" => ["type" => "varchar(255)", "comment" => ""],
688 "family-name" => ["type" => "varchar(255)", "comment" => ""],
689 "photo" => ["type" => "varchar(255)", "comment" => ""],
690 "photo-medium" => ["type" => "varchar(255)", "comment" => ""],
691 "photo-small" => ["type" => "varchar(255)", "comment" => ""],
692 "batch" => ["type" => "varchar(255)", "comment" => ""],
693 "notify" => ["type" => "varchar(255)", "comment" => ""],
694 "poll" => ["type" => "varchar(255)", "comment" => ""],
695 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
696 "searchable" => ["type" => "boolean", "comment" => ""],
697 "pubkey" => ["type" => "text", "comment" => ""],
698 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
699 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
700 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
701 "interacting_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts this contact interacts with"],
702 "interacted_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts that interacted with this contact"],
703 "post_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts and comments"],
706 "PRIMARY" => ["uri-id"],
707 "addr" => ["UNIQUE", "addr"],
708 "alias" => ["alias"],
712 "diaspora-interaction" => [
713 "comment" => "Signed Diaspora Interaction",
715 "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"],
716 "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
719 "PRIMARY" => ["uri-id"]
723 "comment" => "ActivityPub endpoints - used in the ActivityPub implementation",
725 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
726 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
727 "owner-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
730 "PRIMARY" => ["url"],
731 "owner-uri-id_type" => ["UNIQUE", "owner-uri-id", "type"],
735 "comment" => "Events",
737 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
738 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
739 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
740 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
741 "uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
742 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the event uri"],
743 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
744 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
745 "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
746 "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
747 "summary" => ["type" => "text", "comment" => "short description or title of the event"],
748 "desc" => ["type" => "text", "comment" => "event description"],
749 "location" => ["type" => "text", "comment" => "event location"],
750 "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
751 "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
752 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
753 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
754 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed circles"],
755 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
756 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied circles"],
760 "uid_start" => ["uid", "start"],
762 "uri-id" => ["uri-id"],
768 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
769 "url" => ["type" => "varbinary(383)", "comment" => "url that awaiting to be fetched"],
770 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of the fetch request"],
771 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"],
775 "url" => ["UNIQUE", "url"],
776 "created" => ["created"],
781 "comment" => "friend suggestion stuff",
783 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
784 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
785 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
786 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
787 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
788 "request" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
789 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
790 "note" => ["type" => "text", "comment" => ""],
791 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
800 "comment" => "privacy circles, circle info",
802 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
803 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
804 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
805 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the circle has been deleted"],
806 "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Contact id of group. When this field is filled then the members are synced automatically."],
807 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of circle"],
816 "comment" => "privacy circles, member info",
818 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
819 "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "group.id of the associated circle"],
820 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated circle"],
824 "contactid" => ["contact-id"],
825 "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
829 "comment" => "Tags that the server has subscribed",
831 "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["gserver" => "id"], "primary" => "1", "comment" => "The id of the gserver"],
832 "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
835 "PRIMARY" => ["gserver-id", "tag"],
840 "comment" => "addon hook registry",
842 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
843 "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
844 "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
845 "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
846 "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"],
850 "priority" => ["priority"],
851 "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
855 "comment" => "Incoming activity",
857 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
858 "activity-id" => ["type" => "varbinary(383)", "comment" => "id of the incoming activity"],
859 "object-id" => ["type" => "varbinary(383)", "comment" => ""],
860 "in-reply-to-id" => ["type" => "varbinary(383)", "comment" => ""],
861 "conversation" => ["type" => "varbinary(383)", "comment" => ""],
862 "type" => ["type" => "varchar(64)", "comment" => "Type of the activity"],
863 "object-type" => ["type" => "varchar(64)", "comment" => "Type of the object activity"],
864 "object-object-type" => ["type" => "varchar(64)", "comment" => "Type of the object's object activity"],
865 "received" => ["type" => "datetime", "comment" => "Receiving date"],
866 "activity" => ["type" => "mediumtext", "comment" => "The JSON activity"],
867 "signer" => ["type" => "varchar(255)", "comment" => ""],
868 "push" => ["type" => "boolean", "comment" => "Is the entry pushed or have pulled it?"],
869 "trust" => ["type" => "boolean", "comment" => "Do we trust this entry?"],
870 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"],
874 "activity-id" => ["UNIQUE", "activity-id"],
875 "object-id" => ["object-id"],
876 "received" => ["received"],
880 "inbox-entry-receiver" => [
881 "comment" => "Receiver for the incoming activity",
883 "queue-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["inbox-entry" => "id"], "comment" => ""],
884 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
887 "PRIMARY" => ["queue-id", "uid"],
892 "comment" => "Status of ActivityPub inboxes",
894 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
895 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
896 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "ID of the related server"],
897 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
898 "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
899 "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
900 "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
901 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
902 "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
905 "PRIMARY" => ["url"],
906 "uri-id" => ["uri-id"],
913 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
914 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
915 "fid" => ["type" => "int unsigned", "comment" => "deprecated"],
916 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
917 "suggest-cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Suggested contact"],
918 "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
919 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
920 "note" => ["type" => "text", "comment" => ""],
921 "hash" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
922 "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
923 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
924 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
928 "contact-id" => ["contact-id"],
929 "suggest-cid" => ["suggest-cid"],
934 "comment" => "A key value storage",
936 "k" => ["type" => "varbinary(50)", "not null" => "1", "primary" => "1", "comment" => ""],
937 "v" => ["type" => "mediumtext", "comment" => ""],
938 "updated_at" => ["type" => "int unsigned", "not null" => "1", "comment" => "timestamp of the last update"],
947 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
948 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
949 "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
950 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
951 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
955 "name_expires" => ["name", "expires"]
959 "comment" => "private messages",
961 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
962 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
963 "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
964 "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
965 "from-photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
966 "from-url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "profile link of the sender"],
967 "contact-id" => ["type" => "varbinary(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"],
968 "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"],
969 "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"],
970 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
971 "body" => ["type" => "mediumtext", "comment" => ""],
972 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
973 "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
974 "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
975 "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
976 "uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
977 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related mail"],
978 "parent-uri" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
979 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related mail"],
980 "thr-parent" => ["type" => "varbinary(383)", "comment" => ""],
981 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
982 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
986 "uid_seen" => ["uid", "seen"],
987 "convid" => ["convid"],
988 "uri" => ["uri(64)"],
989 "parent-uri" => ["parent-uri(64)"],
990 "contactid" => ["contact-id(32)"],
991 "author-id" => ["author-id"],
992 "uri-id" => ["uri-id"],
993 "parent-uri-id" => ["parent-uri-id"],
994 "thr-parent-id" => ["thr-parent-id"],
998 "comment" => "Mail account data for fetching mails",
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 "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1003 "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1004 "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1005 "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1006 "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1007 "pass" => ["type" => "text", "comment" => ""],
1008 "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1009 "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1010 "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1011 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1012 "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1015 "PRIMARY" => ["id"],
1020 "comment" => "table of accounts that can manage each other",
1022 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1023 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1024 "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1027 "PRIMARY" => ["id"],
1028 "uid_mid" => ["UNIQUE", "uid", "mid"],
1033 "comment" => "notifications",
1035 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1036 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1037 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1038 "type" => ["type" => "smallint unsigned", "comment" => ""],
1039 "actor-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the actor that caused the notification"],
1040 "target-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
1041 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1042 "created" => ["type" => "datetime", "comment" => ""],
1043 "seen" => ["type" => "boolean", "default" => "0", "comment" => "Seen on the desktop"],
1044 "dismissed" => ["type" => "boolean", "default" => "0", "comment" => "Dismissed via the API"],
1047 "PRIMARY" => ["id"],
1048 "uid_vid_type_actor-id_target-uri-id" => ["UNIQUE", "uid", "vid", "type", "actor-id", "target-uri-id"],
1050 "actor-id" => ["actor-id"],
1051 "target-uri-id" => ["target-uri-id"],
1052 "parent-uri-id" => ["parent-uri-id"],
1053 "seen_uid" => ["seen", "uid"],
1054 "uid_type_parent-uri-id_actor-id" => ["uid", "type", "parent-uri-id", "actor-id"],
1058 "comment" => "[Deprecated] User notifications",
1060 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1061 "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1062 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1063 "url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1064 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1065 "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1066 "msg" => ["type" => "mediumtext", "comment" => ""],
1067 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1068 "link" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1069 "iid" => ["type" => "int unsigned", "comment" => ""],
1070 "parent" => ["type" => "int unsigned", "comment" => ""],
1071 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
1072 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1073 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1074 "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
1075 "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
1076 "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
1077 "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
1080 "PRIMARY" => ["id"],
1081 "seen_uid_date" => ["seen", "uid", "date"],
1082 "uid_date" => ["uid", "date"],
1083 "uid_type_link" => ["uid", "type", "link(190)"],
1084 "uri-id" => ["uri-id"],
1085 "parent-uri-id" => ["parent-uri-id"],
1088 "notify-threads" => [
1091 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1092 "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["notify" => "id"], "comment" => ""],
1093 "master-parent-item" => ["type" => "int unsigned", "comment" => "Deprecated"],
1094 "master-parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
1095 "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1096 "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1099 "PRIMARY" => ["id"],
1100 "master-parent-uri-id" => ["master-parent-uri-id"],
1101 "receiver-uid" => ["receiver-uid"],
1102 "notify-id" => ["notify-id"],
1106 "comment" => "cache for OEmbed queries",
1108 "url" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "page url"],
1109 "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
1110 "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
1111 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1114 "PRIMARY" => ["url", "maxwidth"],
1115 "created" => ["created"],
1118 "openwebauth-token" => [
1119 "comment" => "Store OpenWebAuth token to verify contacts",
1121 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1122 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id - currently unused"],
1123 "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
1124 "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
1125 "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1126 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1129 "PRIMARY" => ["id"],
1134 "comment" => "cache for 'parse_url' queries",
1136 "url_hash" => ["type" => "binary(64)", "not null" => "1", "primary" => "1", "comment" => "page url hash"],
1137 "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
1138 "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
1139 "url" => ["type" => "text", "not null" => "1", "comment" => "page url"],
1140 "content" => ["type" => "mediumtext", "comment" => "page data"],
1141 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
1142 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of expiration"],
1145 "PRIMARY" => ["url_hash", "guessing", "oembed"],
1146 "created" => ["created"],
1147 "expires" => ["expires"],
1151 "comment" => "personal (per user) configuration storage",
1153 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Primary key"],
1154 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1155 "cat" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "Category"],
1156 "k" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "Key"],
1157 "v" => ["type" => "mediumtext", "comment" => "Value"],
1160 "PRIMARY" => ["id"],
1161 "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
1165 "comment" => "photo storage",
1167 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1168 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid", "on delete" => "restrict"], "comment" => "Owner User id"],
1169 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "contact.id"],
1170 "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
1171 "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
1172 "hash" => ["type" => "char(32)", "comment" => "hash value of the photo"],
1173 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
1174 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
1175 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1176 "desc" => ["type" => "text", "comment" => ""],
1177 "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
1178 "photo-type" => ["type" => "tinyint unsigned", "comment" => "User avatar, user banner, contact avatar, contact banner or default"],
1179 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1180 "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
1181 "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1182 "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1183 "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1184 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the photo"],
1185 "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
1186 "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1187 "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1188 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
1189 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed circles"],
1190 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
1191 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied circles"],
1192 "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"],
1193 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
1194 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
1195 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1198 "PRIMARY" => ["id"],
1199 "contactid" => ["contact-id"],
1200 "uid_contactid" => ["uid", "contact-id"],
1201 "uid_profile" => ["uid", "profile"],
1202 "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
1203 "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
1204 "resource-id" => ["resource-id"],
1205 "uid_photo-type" => ["uid", "photo-type"],
1209 "comment" => "Structure for all posts",
1211 "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"],
1212 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1213 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1214 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1215 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1216 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1217 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1218 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1219 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1220 "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"],
1221 "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"],
1222 "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"],
1223 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1224 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1225 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1226 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1227 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1228 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"]
1231 "PRIMARY" => ["uri-id"],
1232 "parent-uri-id" => ["parent-uri-id"],
1233 "thr-parent-id" => ["thr-parent-id"],
1234 "external-id" => ["external-id"],
1235 "owner-id" => ["owner-id"],
1236 "author-id" => ["author-id"],
1237 "causer-id" => ["causer-id"],
1241 "post-activity" => [
1242 "comment" => "Original remote activity",
1244 "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"],
1245 "activity" => ["type" => "mediumtext", "comment" => "Original activity"],
1246 "received" => ["type" => "datetime", "comment" => ""],
1249 "PRIMARY" => ["uri-id"],
1252 "post-category" => [
1253 "comment" => "post relation to categories",
1255 "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"],
1256 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1257 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1258 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1261 "PRIMARY" => ["uri-id", "uid", "type", "tid"],
1263 "uid_uri-id" => ["uid", "uri-id"],
1266 "post-collection" => [
1267 "comment" => "Collection of posts",
1269 "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"],
1270 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "0 - Featured"],
1271 "author-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Author of the featured post"],
1274 "PRIMARY" => ["uri-id", "type"],
1276 "author-id" => ["author-id"],
1280 "comment" => "Content for all posts",
1282 "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"],
1283 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1284 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1285 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1286 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1287 "quote-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the quoted uri"],
1288 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1289 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1290 "language" => ["type" => "text", "comment" => "Language information about this post"],
1291 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1292 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1293 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1294 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1295 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1296 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1297 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1298 "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"],
1299 "plink" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1302 "PRIMARY" => ["uri-id"],
1303 "plink" => ["plink(191)"],
1304 "resource-id" => ["resource-id"],
1305 "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
1306 "quote-uri-id" => ["quote-uri-id"],
1309 "post-delivery" => [
1310 "comment" => "Delivery data for posts for the batch processing",
1312 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1313 "inbox-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of inbox url"],
1314 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Delivering user"],
1315 "created" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
1316 "command" => ["type" => "varbinary(32)", "comment" => ""],
1317 "failed" => ["type" => "tinyint", "default" => 0, "comment" => "Number of times the delivery has failed"],
1318 "receivers" => ["type" => "mediumtext", "comment" => "JSON encoded array with the receiving contacts"],
1321 "PRIMARY" => ["uri-id", "inbox-id"],
1322 "inbox-id_created" => ["inbox-id", "created"],
1326 "post-delivery-data" => [
1327 "comment" => "Delivery data for items",
1329 "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"],
1330 "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"],
1331 "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
1332 "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
1333 "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
1334 "queue_failed" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of unsuccessful deliveries, used as item.delivery_queue_failed"],
1335 "activitypub" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via ActivityPub"],
1336 "dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via DFRN"],
1337 "legacy_dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via legacy DFRN"],
1338 "diaspora" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via Diaspora"],
1339 "ostatus" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via OStatus"],
1342 "PRIMARY" => ["uri-id"],
1345 "post-engagement" => [
1346 "comment" => "Engagement data per post",
1348 "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"],
1349 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "Item owner"],
1350 "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Person, organisation, news, community, relay"],
1351 "media-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Type of media in a bit array (1 = image, 2 = video, 4 = audio"],
1352 "language" => ["type" => "varbinary(128)", "comment" => "Language information about this post"],
1353 "created" => ["type" => "datetime", "comment" => ""],
1354 "restricted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "If true, this post is either unlisted or not from a federated network"],
1355 "comments" => ["type" => "mediumint unsigned", "comment" => "Number of comments"],
1356 "activities" => ["type" => "mediumint unsigned", "comment" => "Number of activities (like, dislike, ...)"],
1359 "PRIMARY" => ["uri-id"],
1360 "owner-id" => ["owner-id"],
1361 "created" => ["created"],
1365 "comment" => "Post history",
1367 "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"],
1368 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "primary" => "1", "comment" => "Date of edit"],
1369 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1370 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1371 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1372 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1373 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1374 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1375 "language" => ["type" => "text", "comment" => "Language information about this post"],
1376 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1377 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1378 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1379 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1380 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1381 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1382 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1383 "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"],
1384 "plink" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1387 "PRIMARY" => ["uri-id", "edited"],
1391 "comment" => "Post related external links",
1393 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1394 "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"],
1395 "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "External URL"],
1396 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1397 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1398 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1399 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the link"],
1402 "PRIMARY" => ["id"],
1403 "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1407 "comment" => "Attached media",
1409 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1410 "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1411 "url" => ["type" => "varbinary(1024)", "not null" => "1", "comment" => "Media URL"],
1412 "media-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the activities uri-id"],
1413 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
1414 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1415 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1416 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1417 "size" => ["type" => "bigint unsigned", "comment" => "Media size"],
1418 "blurhash" => ["type" => "varbinary(255)", "comment" => "BlurHash representation of the image"],
1419 "preview" => ["type" => "varbinary(512)", "comment" => "Preview URL"],
1420 "preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
1421 "preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
1422 "description" => ["type" => "text", "comment" => ""],
1423 "name" => ["type" => "varchar(255)", "comment" => "Name of the media"],
1424 "author-url" => ["type" => "varbinary(383)", "comment" => "URL of the author of the media"],
1425 "author-name" => ["type" => "varchar(255)", "comment" => "Name of the author of the media"],
1426 "author-image" => ["type" => "varbinary(383)", "comment" => "Image of the author of the media"],
1427 "publisher-url" => ["type" => "varbinary(383)", "comment" => "URL of the publisher of the media"],
1428 "publisher-name" => ["type" => "varchar(255)", "comment" => "Name of the publisher of the media"],
1429 "publisher-image" => ["type" => "varbinary(383)", "comment" => "Image of the publisher of the media"],
1432 "PRIMARY" => ["id"],
1433 "uri-id-url" => ["UNIQUE", "uri-id", "url(512)"],
1434 "uri-id-id" => ["uri-id", "id"],
1435 "media-uri-id" => ["media-uri-id"],
1438 "post-question" => [
1439 "comment" => "Question",
1441 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1442 "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"],
1443 "multiple" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Multiple choice"],
1444 "voters" => ["type" => "int unsigned", "comment" => "Number of voters for this question"],
1445 "end-time" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Question end time"],
1448 "PRIMARY" => ["id"],
1449 "uri-id" => ["UNIQUE", "uri-id"],
1452 "post-question-option" => [
1453 "comment" => "Question option",
1455 "id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "Id of the question"],
1456 "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"],
1457 "name" => ["type" => "varchar(255)", "comment" => "Name of the option"],
1458 "replies" => ["type" => "int unsigned", "comment" => "Number of replies for this question option"],
1461 "PRIMARY" => ["uri-id", "id"],
1465 "comment" => "post relation to tags",
1467 "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"],
1468 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1469 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1470 "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"],
1473 "PRIMARY" => ["uri-id", "type", "tid", "cid"],
1479 "comment" => "Thread related data",
1481 "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"],
1482 "conversation-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the conversation uri"],
1483 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1484 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1485 "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"],
1486 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1487 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1488 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1489 "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"],
1490 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1493 "PRIMARY" => ["uri-id"],
1494 "conversation-id" => ["conversation-id"],
1495 "owner-id" => ["owner-id"],
1496 "author-id" => ["author-id"],
1497 "causer-id" => ["causer-id"],
1498 "received" => ["received"],
1499 "commented" => ["commented"],
1503 "comment" => "User specific post data",
1505 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
1506 "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"],
1507 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1508 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1509 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1510 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1511 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1512 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1513 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1514 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1515 "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"],
1516 "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"],
1517 "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"],
1518 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1519 "post-reason" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Reason why the post arrived at the user"],
1520 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1521 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1522 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1523 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1524 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"],
1525 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1526 "protocol" => ["type" => "tinyint unsigned", "comment" => "Protocol used to deliver the item for this user"],
1527 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1528 "event-id" => ["type" => "int unsigned", "foreign" => ["event" => "id"], "comment" => "Used to link to the event.id"],
1529 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1530 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1531 "notification-type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1532 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1533 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1534 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1537 "PRIMARY" => ["id"],
1538 "uid_uri-id" => ["UNIQUE", "uid", "uri-id"],
1539 "uri-id" => ["uri-id"],
1540 "parent-uri-id" => ["parent-uri-id"],
1541 "thr-parent-id" => ["thr-parent-id"],
1542 "external-id" => ["external-id"],
1543 "owner-id" => ["owner-id"],
1544 "author-id" => ["author-id"],
1545 "causer-id" => ["causer-id"],
1547 "contact-id" => ["contact-id"],
1548 "event-id" => ["event-id"],
1550 "author-id_uid" => ["author-id", "uid"],
1551 "author-id_received" => ["author-id", "received"],
1552 "parent-uri-id_uid" => ["parent-uri-id", "uid"],
1553 "uid_wall_received" => ["uid", "wall", "received"],
1554 "uid_contactid" => ["uid", "contact-id"],
1555 "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
1556 "uid_unseen" => ["uid", "unseen"],
1557 "uid_hidden_uri-id" => ["uid", "hidden", "uri-id"],
1560 "post-thread-user" => [
1561 "comment" => "Thread related data per user",
1563 "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"],
1564 "conversation-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the conversation uri"],
1565 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1566 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1567 "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"],
1568 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1569 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1570 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1571 "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"],
1572 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1573 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1574 "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
1575 "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1576 "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"],
1577 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1578 "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1579 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1580 "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
1581 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1582 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1583 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1584 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1585 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1586 "post-user-id" => ["type" => "int unsigned", "foreign" => ["post-user" => "id"], "comment" => "Id of the post-user table"],
1589 "PRIMARY" => ["uid", "uri-id"],
1590 "uri-id" => ["uri-id"],
1591 "conversation-id" => ["conversation-id"],
1592 "owner-id" => ["owner-id"],
1593 "author-id" => ["author-id"],
1594 "causer-id" => ["causer-id"],
1596 "contact-id" => ["contact-id"],
1598 "post-user-id" => ["post-user-id"],
1599 "commented" => ["commented"],
1600 "received" => ["received"],
1601 "uid_received" => ["uid", "received"],
1602 "uid_wall_received" => ["uid", "wall", "received"],
1603 "uid_commented" => ["uid", "commented"],
1604 "uid_starred" => ["uid", "starred"],
1605 "uid_mention" => ["uid", "mention"],
1608 "post-user-notification" => [
1609 "comment" => "User post notifications",
1611 "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"],
1612 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1613 "notification-type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1616 "PRIMARY" => ["uid", "uri-id"],
1617 "uri-id" => ["uri-id"],
1621 "comment" => "Currently running system processes",
1623 "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "The ID of the process"],
1624 "hostname" => ["type" => "varchar(255)", "not null" => "1", "primary" => "1", "comment" => "The name of the host the process is ran on"],
1625 "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
1626 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1629 "PRIMARY" => ["pid", "hostname"],
1630 "command" => ["command"],
1634 "comment" => "user profiles data",
1636 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1637 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1638 "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1639 "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
1640 "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
1641 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Unused in favor of user.username"],
1642 "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1643 "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
1644 "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1645 "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1646 "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1647 "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1648 "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1649 "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1650 "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
1651 "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1652 "with" => ["type" => "text", "comment" => "Deprecated"],
1653 "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
1654 "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1655 "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1656 "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1657 "pub_keywords" => ["type" => "text", "comment" => ""],
1658 "prv_keywords" => ["type" => "text", "comment" => ""],
1659 "likes" => ["type" => "text", "comment" => "Deprecated"],
1660 "dislikes" => ["type" => "text", "comment" => "Deprecated"],
1661 "about" => ["type" => "text", "comment" => "Profile description"],
1662 "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1663 "music" => ["type" => "text", "comment" => "Deprecated"],
1664 "book" => ["type" => "text", "comment" => "Deprecated"],
1665 "tv" => ["type" => "text", "comment" => "Deprecated"],
1666 "film" => ["type" => "text", "comment" => "Deprecated"],
1667 "interest" => ["type" => "text", "comment" => "Deprecated"],
1668 "romance" => ["type" => "text", "comment" => "Deprecated"],
1669 "work" => ["type" => "text", "comment" => "Deprecated"],
1670 "education" => ["type" => "text", "comment" => "Deprecated"],
1671 "contact" => ["type" => "text", "comment" => "Deprecated"],
1672 "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1673 "homepage_verified" => ["type" => "boolean", "not null" => 1, "default" => "0", "comment" => "was the homepage verified by a rel-me link back to the profile"],
1674 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
1675 "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
1676 "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1677 "thumb" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1678 "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
1679 "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
1682 "PRIMARY" => ["id"],
1683 "uid_is-default" => ["uid", "is-default"],
1684 "pub_keywords" => ["FULLTEXT", "pub_keywords"],
1687 "profile_field" => [
1688 "comment" => "Custom profile fields",
1690 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1691 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner user id"],
1692 "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
1693 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this profile field - 0 = public"],
1694 "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
1695 "value" => ["type" => "text", "comment" => "Value of the field"],
1696 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
1697 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
1700 "PRIMARY" => ["id"],
1702 "order" => ["order"],
1706 "push_subscriber" => [
1707 "comment" => "Used for OStatus: Contains feed subscribers",
1709 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1710 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1711 "callback_url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],
1712 "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1713 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1714 "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1715 "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
1716 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1717 "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
1718 "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1721 "PRIMARY" => ["id"],
1722 "next_try" => ["next_try"],
1727 "comment" => "registrations requiring admin approval",
1729 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1730 "hash" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1731 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1732 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1733 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1734 "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1735 "note" => ["type" => "text", "comment" => ""],
1738 "PRIMARY" => ["id"],
1745 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1746 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Reporting user"],
1747 "reporter-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Reporting contact"],
1748 "cid" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["contact" => "id"], "comment" => "Reported contact"],
1749 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id"], "comment" => "Reported contact server"],
1750 "comment" => ["type" => "text", "comment" => "Report"],
1751 "category-id" => ["type" => "int unsigned", "not null" => 1, "default" => \Friendica\Moderation\Entity\Report::CATEGORY_OTHER, "comment" => "Report category, one of Entity Report::CATEGORY_*"],
1752 "forward" => ["type" => "boolean", "comment" => "Forward the report to the remote server"],
1753 "public-remarks" => ["type" => "text", "comment" => "Remarks shared with the reporter"],
1754 "private-remarks" => ["type" => "text", "comment" => "Remarks shared with the moderation team"],
1755 "last-editor-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Last editor user"],
1756 "assigned-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Assigned moderator user"],
1757 "status" => ["type" => "tinyint unsigned", "not null" => "1", "comment" => "Status of the report, one of Entity Report::STATUS_*"],
1758 "resolution" => ["type" => "tinyint unsigned", "comment" => "Resolution of the report, one of Entity Report::RESOLUTION_*"],
1759 "created" => ["type" => "datetime(6)", "not null" => "1", "default" => DBA::NULL_DATETIME6, "comment" => ""],
1760 "edited" => ["type" => "datetime(6)", "comment" => "Last time the report has been edited"],
1763 "PRIMARY" => ["id"],
1766 "reporter-id" => ["reporter-id"],
1768 "last-editor-uid" => ["last-editor-uid"],
1769 "assigned-uid" => ["assigned-uid"],
1770 "status-resolution" => ["status", "resolution"],
1771 "created" => ["created"],
1772 "edited" => ["edited"],
1776 "comment" => "Individual posts attached to a moderation report",
1778 "rid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["report" => "id"], "comment" => "Report id"],
1779 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Uri-id of the reported post"],
1780 "status" => ["type" => "tinyint unsigned", "comment" => "Status of the reported post"],
1783 "PRIMARY" => ["rid", "uri-id"],
1784 "uri-id" => ["uri-id"],
1788 "comment" => "Terms of service rule lines relevant to a moderation report",
1790 "rid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["report" => "id"], "comment" => "Report id"],
1791 "line-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "Terms of service rule line number, may become invalid after a TOS change."],
1792 "text" => ["type" => "text", "not null" => "1", "comment" => "Terms of service rule text recorded at the time of the report"],
1795 "PRIMARY" => ["rid", "line-id"],
1801 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1802 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1803 "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1806 "PRIMARY" => ["id"],
1807 "uid_term" => ["uid", "term(64)"],
1808 "term" => ["term(64)"]
1812 "comment" => "web session storage",
1814 "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1815 "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1816 "data" => ["type" => "text", "comment" => ""],
1817 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1820 "PRIMARY" => ["id"],
1821 "sid" => ["sid(64)"],
1822 "expire" => ["expire"],
1826 "comment" => "Data stored by Database storage backend",
1828 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1829 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]
1836 "comment" => "Push Subscription for the API",
1838 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1839 "application-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["application" => "id"], "comment" => ""],
1840 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1841 "endpoint" => ["type" => "varchar(511)", "comment" => "Endpoint URL"],
1842 "pubkey" => ["type" => "varchar(127)", "comment" => "User agent public key"],
1843 "secret" => ["type" => "varchar(32)", "comment" => "Auth secret"],
1844 "follow" => ["type" => "boolean", "comment" => ""],
1845 "favourite" => ["type" => "boolean", "comment" => ""],
1846 "reblog" => ["type" => "boolean", "comment" => ""],
1847 "mention" => ["type" => "boolean", "comment" => ""],
1848 "poll" => ["type" => "boolean", "comment" => ""],
1849 "follow_request" => ["type" => "boolean", "comment" => ""],
1850 "status" => ["type" => "boolean", "comment" => ""],
1853 "PRIMARY" => ["id"],
1854 "application-id_uid" => ["UNIQUE", "application-id", "uid"],
1855 "uid_application-id" => ["uid", "application-id"],
1859 "comment" => "Deleted usernames",
1861 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1862 "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
1865 "PRIMARY" => ["id"],
1866 "username" => ["username(32)"],
1870 "comment" => "User specific public contact data",
1872 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
1873 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1874 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
1875 "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
1876 "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
1877 "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"],
1878 "hidden" => ["type" => "boolean", "comment" => "This contact is hidden from the others"],
1879 "is-blocked" => ["type" => "boolean", "comment" => "User is blocked by this contact"],
1880 "channel-frequency" => ["type" => "tinyint unsigned", "comment" => "Controls the frequency of the appearance of this contact in channels"],
1881 "pending" => ["type" => "boolean", "comment" => ""],
1882 "rel" => ["type" => "tinyint unsigned", "comment" => "The kind of the relation between the user and the contact"],
1883 "info" => ["type" => "mediumtext", "comment" => ""],
1884 "notify_new_posts" => ["type" => "boolean", "comment" => ""],
1885 "remote_self" => ["type" => "tinyint unsigned", "comment" => "0 => No mirroring, 1-2 => Mirror as own post, 3 => Mirror as reshare"],
1886 "fetch_further_information" => ["type" => "tinyint unsigned", "comment" => "0 => None, 1 => Fetch information, 3 => Fetch keywords, 2 => Fetch both"],
1887 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
1888 "subhub" => ["type" => "boolean", "comment" => ""],
1889 "hub-verify" => ["type" => "varbinary(383)", "comment" => ""],
1890 "protocol" => ["type" => "char(4)", "comment" => "Protocol of the contact"],
1891 "rating" => ["type" => "tinyint", "comment" => "Automatically detected feed poll frequency"],
1892 "priority" => ["type" => "tinyint unsigned", "comment" => "Feed poll priority"],
1895 "PRIMARY" => ["uid", "cid"],
1897 "uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
1900 "arrived-activity" => [
1901 "comment" => "Id of arrived activities",
1903 "object-id" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "object id of the incoming activity"],
1904 "received" => ["type" => "datetime", "comment" => "Receiving date"],
1907 "PRIMARY" => ["object-id"],
1909 "engine" => "MEMORY",
1911 "fetched-activity" => [
1912 "comment" => "Id of fetched activities",
1914 "object-id" => ["type" => "varbinary(383)", "not null" => "1", "primary" => "1", "comment" => "object id of fetched activity"],
1915 "received" => ["type" => "datetime", "comment" => "Receiving date"],
1918 "PRIMARY" => ["object-id"],
1920 "engine" => "MEMORY",
1923 "comment" => "Inter process communication between the frontend and the worker",
1925 "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
1926 "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
1929 "PRIMARY" => ["key"],
1931 "engine" => "MEMORY",