3 * @copyright Copyright (C) 2010-2021, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 * Main database structure configuration file.
22 * Here are described all the tables, fields and indexes Friendica needs to work.
23 * The entry order is mostly alphabetic - with the exception of tables that are used in foreign keys.
25 * Syntax (braces indicate optionale values):
27 * "comment" => "Description of the table",
30 * "type" => "<field type>{(<field size>)} <unsigned>",
32 * {"extra" => "auto_increment",}
33 * {"default" => "<default value>",}
34 * {"default" => NULL_DATE,} (for datetime fields)
36 * {"foreign|relation" => ["<foreign key table name>" => "<foreign key field name>"],}
37 * "comment" => "Description of the fields"
42 * "PRIMARY" => ["<primary key field name>", ...],
43 * "<index name>" => [{"UNIQUE",} "<field name>{(<key size>)}", ...]
48 * Whenever possible prefer "foreign" before "relation" with the foreign keys.
49 * "foreign" adds true foreign keys on the database level, while "relation" is just an indicator of a table relation without any consequences
51 * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value below.
55 use Friendica\Database\DBA;
57 if (!defined('DB_UPDATE_VERSION')) {
58 define('DB_UPDATE_VERSION', 1416);
64 "comment" => "Global servers",
66 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
67 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
68 "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
69 "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
70 "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
71 "info" => ["type" => "text", "comment" => ""],
72 "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
73 "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
74 "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
75 "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
76 "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
77 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
78 "protocol" => ["type" => "tinyint unsigned", "comment" => "The protocol of the server"],
79 "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
80 "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
81 "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
82 "detection-method" => ["type" => "tinyint unsigned", "comment" => "Method that had been used to detect that server"],
83 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
84 "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
85 "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last successful connection request"],
86 "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last failed connection request"],
87 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
88 "next_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Next connection request"],
92 "nurl" => ["UNIQUE", "nurl(190)"],
93 "next_contact" => ["next_contact"],
94 "network" => ["network"],
98 "comment" => "The local users",
100 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
101 "parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"],
102 "comment" => "The parent user that has full control about this user"],
103 "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
104 "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
105 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
106 "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
107 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
108 "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
109 "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
110 "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
111 "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
112 "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
113 "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
114 "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
115 "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
116 "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
117 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
118 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
119 "spubkey" => ["type" => "text", "comment" => ""],
120 "sprvkey" => ["type" => "text", "comment" => ""],
121 "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
122 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
123 "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
124 "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
125 "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
126 "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
127 "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
128 "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
129 "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
130 "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
131 "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
132 "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
133 "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
134 "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
135 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
136 "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
137 "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
138 "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
139 "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
140 "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
141 "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
142 "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
143 "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
144 "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
145 "openidserver" => ["type" => "text", "comment" => ""],
148 "PRIMARY" => ["uid"],
149 "nickname" => ["nickname(32)"],
150 "parent-uid" => ["parent-uid"],
152 "email" => ["email(64)"],
156 "comment" => "contact table",
158 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
159 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
160 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
161 "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"],
162 "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
163 "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
164 "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
165 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
166 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network of the contact"],
167 "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"],
168 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
169 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
170 "location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
171 "about" => ["type" => "text", "comment" => ""],
172 "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
173 "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
174 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
175 "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
176 "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
177 "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"],
178 "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
179 "micro" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
180 "site-pubkey" => ["type" => "text", "comment" => ""],
181 "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
182 "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
183 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
184 "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
185 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
186 "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
187 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
188 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
189 "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
190 "request" => ["type" => "varchar(255)", "comment" => ""],
191 "notify" => ["type" => "varchar(255)", "comment" => ""],
192 "poll" => ["type" => "varchar(255)", "comment" => ""],
193 "confirm" => ["type" => "varchar(255)", "comment" => ""],
194 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
195 "poco" => ["type" => "varchar(255)", "comment" => ""],
196 "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
197 "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
198 "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
199 "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
200 "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
201 "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
202 "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
203 "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
204 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
205 "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
206 "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
207 "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
208 "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
209 "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
210 "last-discovery" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last follower discovery"],
211 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
212 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Node-wide block status"],
213 "block_reason" => ["type" => "text", "comment" => "Node-wide block reason"],
214 "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
215 "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
216 "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum"],
217 "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group"],
218 "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
219 "manually-approve" => ["type" => "boolean", "comment" => ""],
220 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
221 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
222 "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
223 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
224 "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
225 "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"],
226 "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"],
227 "baseurl" => ["type" => "varchar(255)", "default" => "", "comment" => "baseurl of the contact"],
228 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
229 "reason" => ["type" => "text", "comment" => ""],
230 "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""],
231 "info" => ["type" => "mediumtext", "comment" => ""],
232 "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
233 "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
234 "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
235 "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
236 "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
237 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
241 "uid_name" => ["uid", "name(190)"],
242 "self_uid" => ["self", "uid"],
243 "alias_uid" => ["alias(128)", "uid"],
244 "pending_uid" => ["pending", "uid"],
245 "blocked_uid" => ["blocked", "uid"],
246 "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
247 "uid_network_batch" => ["uid", "network", "batch(64)"],
248 "batch_contact-type" => ["batch(64)", "contact-type"],
249 "addr_uid" => ["addr(128)", "uid"],
250 "nurl_uid" => ["nurl(128)", "uid"],
251 "nick_uid" => ["nick(128)", "uid"],
252 "attag_uid" => ["attag(96)", "uid"],
253 "dfrn-id" => ["dfrn-id(64)"],
254 "issued-id" => ["issued-id(64)"],
255 "network_uid_lastupdate" => ["network", "uid", "last-update"],
256 "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
257 "uid_lastitem" => ["uid", "last-item"],
258 "baseurl" => ["baseurl(64)"],
259 "uid_contact-type" => ["uid", "contact-type"],
260 "uid_self_contact-type" => ["uid", "self", "contact-type"],
261 "self_network_uid" => ["self", "network", "uid"],
266 "comment" => "URI and GUID for items",
268 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
269 "uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
270 "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
274 "uri" => ["UNIQUE", "uri"],
279 "comment" => "tags and mentions",
281 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
282 "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
283 "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""]
287 "type_name_url" => ["UNIQUE", "name", "url"],
292 "comment" => "OAuth usage",
294 "client_id" => ["type" => "varchar(20)", "not null" => "1", "primary" => "1", "comment" => ""],
295 "pw" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => ""],
296 "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
297 "name" => ["type" => "text", "comment" => ""],
298 "icon" => ["type" => "text", "comment" => ""],
299 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
302 "PRIMARY" => ["client_id"],
309 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
310 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
311 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
312 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
313 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
314 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
318 "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["uid", "allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
322 "comment" => "Activity Verbs",
324 "id" => ["type" => "smallint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
325 "name" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""]
333 "2fa_app_specific_password" => [
334 "comment" => "Two-factor app-specific _password",
336 "id" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Password ID for revocation"],
337 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
338 "description" => ["type" => "varchar(255)", "comment" => "Description of the usage of the password"],
339 "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "comment" => "Hashed password"],
340 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the password was generated"],
341 "last_used" => ["type" => "datetime", "comment" => "Datetime the password was last used"],
345 "uid_description" => ["uid", "description(190)"],
348 "2fa_recovery_codes" => [
349 "comment" => "Two-factor authentication recovery codes",
351 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
352 "code" => ["type" => "varchar(50)", "not null" => "1", "primary" => "1", "comment" => "Recovery code string"],
353 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the code was generated"],
354 "used" => ["type" => "datetime", "comment" => "Datetime the code was used"],
357 "PRIMARY" => ["uid", "code"]
360 "2fa_trusted_browser" => [
361 "comment" => "Two-factor authentication trusted browsers",
363 "cookie_hash" => ["type" => "varchar(80)", "not null" => "1", "primary" => "1", "comment" => "Trusted cookie hash"],
364 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
365 "user_agent" => ["type" => "text", "comment" => "User agent string"],
366 "created" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the trusted browser was recorded"],
367 "last_used" => ["type" => "datetime", "comment" => "Datetime the trusted browser was last used"],
370 "PRIMARY" => ["cookie_hash"],
375 "comment" => "registered addons",
377 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
378 "name" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "addon base (file)name"],
379 "version" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "currently unused"],
380 "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently always 1"],
381 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently unused"],
382 "timestamp" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "file timestamp to check for reloads"],
383 "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = has admin config, 0 = has no admin config"],
387 "installed_name" => ["installed", "name"],
388 "name" => ["UNIQUE", "name"],
392 "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
394 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
395 "uuid" => ["type" => "varchar(255)", "comment" => ""],
396 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
397 "following" => ["type" => "varchar(255)", "comment" => ""],
398 "followers" => ["type" => "varchar(255)", "comment" => ""],
399 "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
400 "outbox" => ["type" => "varchar(255)", "comment" => ""],
401 "sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
402 "manually-approve" => ["type" => "boolean", "comment" => ""],
403 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
404 "name" => ["type" => "varchar(255)", "comment" => ""],
405 "about" => ["type" => "text", "comment" => ""],
406 "photo" => ["type" => "varchar(255)", "comment" => ""],
407 "addr" => ["type" => "varchar(255)", "comment" => ""],
408 "alias" => ["type" => "varchar(255)", "comment" => ""],
409 "pubkey" => ["type" => "text", "comment" => ""],
410 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
411 "baseurl" => ["type" => "varchar(255)", "comment" => "baseurl of the ap contact"],
412 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
413 "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
414 "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
415 "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
416 "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
417 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
420 "PRIMARY" => ["url"],
421 "addr" => ["addr(32)"],
422 "alias" => ["alias(190)"],
423 "followers" => ["followers(190)"],
424 "baseurl" => ["baseurl(190)"],
425 "sharedinbox" => ["sharedinbox(190)"],
430 "comment" => "OAuth application",
432 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
433 "client_id" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
434 "client_secret" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
435 "name" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
436 "redirect_uri" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
437 "website" => ["type" => "varchar(255)", "comment" => ""],
438 "scopes" => ["type" => "varchar(255)", "comment" => ""],
442 "client_id" => ["UNIQUE", "client_id"]
445 "application-token" => [
446 "comment" => "OAuth user token",
448 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
449 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
450 "code" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
451 "access_token" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
452 "created_at" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
455 "PRIMARY" => ["application-id", "uid"],
456 "uid_id" => ["uid", "application-id"],
460 "comment" => "file attachments",
462 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
463 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
464 "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
465 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
466 "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
467 "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
468 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
469 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
470 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
471 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
472 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
473 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
474 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
475 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
476 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
484 "comment" => "OAuth usage",
486 "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
487 "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "foreign" => ["clients" => "client_id"],
489 "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
490 "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
491 "scope" => ["type" => "varchar(250)", "not null" => "1", "default" => "", "comment" => ""],
495 "client_id" => ["client_id"]
499 "comment" => "Stores temporary data",
501 "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
502 "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
503 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
504 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
508 "k_expires" => ["k", "expires"],
514 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
515 "challenge" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
516 "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
517 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
518 "type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
519 "last_update" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
523 "expire" => ["expire"],
527 "comment" => "main configuration storage",
529 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
530 "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
531 "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
532 "v" => ["type" => "mediumtext", "comment" => ""],
536 "cat_k" => ["UNIQUE", "cat", "k"],
539 "contact-relation" => [
540 "comment" => "Contact relations",
542 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "contact the related contact had interacted with"],
543 "relation-cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "related contact who had interacted with the contact"],
544 "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction"],
545 "follow-updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last update of the contact relationship"],
546 "follows" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
549 "PRIMARY" => ["cid", "relation-cid"],
550 "relation-cid" => ["relation-cid"],
554 "comment" => "private messages",
556 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
557 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
558 "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
559 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
560 "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
561 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
562 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
563 "subject" => ["type" => "text", "comment" => "subject of initial message"],
571 "comment" => "Raw data and structure information for messages",
573 "item-uri" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "Original URI of the item - unrelated to the table with the same name"],
574 "reply-to-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "URI to which this item is a reply"],
575 "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation URI"],
576 "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation link"],
577 "protocol" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "255", "comment" => "The protocol of the item"],
578 "direction" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "How the message arrived here: 1=push, 2=pull"],
579 "source" => ["type" => "mediumtext", "comment" => "Original source"],
580 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Receiving date"],
583 "PRIMARY" => ["item-uri"],
584 "conversation-uri" => ["conversation-uri"],
585 "received" => ["received"],
589 "comment" => "Posts that are about to be distributed at a later time",
591 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
592 "uri" => ["type" => "varchar(255)", "comment" => "URI of the post that will be distributed later"],
593 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
594 "delayed" => ["type" => "datetime", "comment" => "delay time"],
598 "uid_uri" => ["UNIQUE", "uid", "uri(190)"],
601 "diaspora-interaction" => [
602 "comment" => "Signed Diaspora Interaction",
604 "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"],
605 "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
608 "PRIMARY" => ["uri-id"]
612 "comment" => "Events",
614 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
615 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
616 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
617 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
618 "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
619 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
620 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
621 "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
622 "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
623 "summary" => ["type" => "text", "comment" => "short description or title of the event"],
624 "desc" => ["type" => "text", "comment" => "event description"],
625 "location" => ["type" => "text", "comment" => "event location"],
626 "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
627 "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
628 "adjust" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "adjust to timezone of the recipient (0 or 1)"],
629 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
630 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
631 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
632 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
633 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
637 "uid_start" => ["uid", "start"],
642 "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
644 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
645 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "unique id"],
646 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
647 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
648 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
649 "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
650 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
651 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
652 "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
653 "notify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
654 "poll" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
655 "confirm" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
656 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
657 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
658 "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
659 "pubkey" => ["type" => "text", "comment" => ""],
660 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
664 "addr" => ["addr(32)"],
665 "url" => ["UNIQUE", "url(190)"],
669 "comment" => "friend suggestion stuff",
671 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
672 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
673 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
674 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
675 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
676 "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
677 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
678 "note" => ["type" => "text", "comment" => ""],
679 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
688 "comment" => "privacy groups, group info",
690 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
691 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
692 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
693 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
694 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
702 "comment" => "privacy groups, member info",
704 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
705 "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "groups.id of the associated group"],
706 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
710 "contactid" => ["contact-id"],
711 "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
715 "comment" => "Tags that the server has subscribed",
717 "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["gserver" => "id"], "primary" => "1",
718 "comment" => "The id of the gserver"],
719 "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
722 "PRIMARY" => ["gserver-id", "tag"],
727 "comment" => "addon hook registry",
729 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
730 "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
731 "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
732 "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
733 "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"],
737 "priority" => ["priority"],
738 "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
742 "comment" => "Hostname",
744 "id" => ["type" => "tinyint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
745 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "The hostname"],
749 "name" => ["UNIQUE", "name"],
753 "comment" => "Status of ActivityPub inboxes",
755 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
756 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
757 "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
758 "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
759 "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
760 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
761 "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
770 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
771 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
772 "fid" => ["type" => "int unsigned", "relation" => ["fcontact" => "id"], "comment" => ""],
773 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
774 "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
775 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
776 "note" => ["type" => "text", "comment" => ""],
777 "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
778 "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
779 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
780 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
784 "contact-id" => ["contact-id"],
791 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
792 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
793 "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
794 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
795 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
799 "name_expires" => ["name", "expires"]
803 "comment" => "private messages",
805 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
806 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
807 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
808 "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
809 "from-photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
810 "from-url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
811 "contact-id" => ["type" => "varchar(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"],
812 "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"],
813 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
814 "body" => ["type" => "mediumtext", "comment" => ""],
815 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
816 "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
817 "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
818 "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
819 "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
820 "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
821 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
825 "uid_seen" => ["uid", "seen"],
826 "convid" => ["convid"],
827 "uri" => ["uri(64)"],
828 "parent-uri" => ["parent-uri(64)"],
829 "contactid" => ["contact-id(32)"],
833 "comment" => "Mail account data for fetching mails",
835 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
836 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
837 "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
838 "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
839 "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
840 "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
841 "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
842 "pass" => ["type" => "text", "comment" => ""],
843 "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
844 "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
845 "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
846 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
847 "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
855 "comment" => "table of accounts that can manage each other",
857 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
858 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
859 "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
863 "uid_mid" => ["UNIQUE", "uid", "mid"],
868 "comment" => "notifications",
870 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
871 "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
872 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
873 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
874 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
875 "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
876 "msg" => ["type" => "mediumtext", "comment" => ""],
877 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
878 "link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
879 "iid" => ["type" => "int unsigned", "comment" => ""],
880 "parent" => ["type" => "int unsigned", "comment" => ""],
881 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
882 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
883 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
884 "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
885 "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
886 "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
887 "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
891 "seen_uid_date" => ["seen", "uid", "date"],
892 "uid_date" => ["uid", "date"],
893 "uid_type_link" => ["uid", "type", "link(190)"],
894 "uri-id" => ["uri-id"],
895 "parent-uri-id" => ["parent-uri-id"],
898 "notify-threads" => [
901 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
902 "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["notify" => "id"], "comment" => ""],
903 "master-parent-item" => ["type" => "int unsigned", "comment" => "Deprecated"],
904 "master-parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
905 "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
906 "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"],
907 "comment" => "User id"],
911 "master-parent-uri-id" => ["master-parent-uri-id"],
912 "receiver-uid" => ["receiver-uid"],
913 "notify-id" => ["notify-id"],
917 "comment" => "cache for OEmbed queries",
919 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
920 "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
921 "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
922 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
925 "PRIMARY" => ["url", "maxwidth"],
926 "created" => ["created"],
929 "openwebauth-token" => [
930 "comment" => "Store OpenWebAuth token to verify contacts",
932 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
933 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id - currently unused"],
934 "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
935 "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
936 "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
937 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
945 "comment" => "cache for 'parse_url' queries",
947 "url_hash" => ["type" => "binary(64)", "not null" => "1", "primary" => "1", "comment" => "page url hash"],
948 "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
949 "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
950 "url" => ["type" => "text", "not null" => "1", "comment" => "page url"],
951 "content" => ["type" => "mediumtext", "comment" => "page data"],
952 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
953 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of expiration"],
956 "PRIMARY" => ["url_hash", "guessing", "oembed"],
957 "created" => ["created"],
958 "expires" => ["expires"],
962 "comment" => "personal (per user) configuration storage",
964 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Primary key"],
965 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
966 "cat" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "Category"],
967 "k" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "Key"],
968 "v" => ["type" => "mediumtext", "comment" => "Value"],
972 "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
976 "comment" => "photo storage",
978 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
979 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid", "on delete" => "restrict"], "comment" => "Owner User id"],
980 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "contact.id"],
981 "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
982 "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
983 "hash" => ["type" => "char(32)", "comment" => "hash value of the photo"],
984 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
985 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
986 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
987 "desc" => ["type" => "text", "comment" => ""],
988 "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
989 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
990 "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
991 "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
992 "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
993 "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
994 "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
995 "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
996 "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
997 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
998 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
999 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
1000 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
1001 "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"],
1002 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
1003 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
1004 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1007 "PRIMARY" => ["id"],
1008 "contactid" => ["contact-id"],
1009 "uid_contactid" => ["uid", "contact-id"],
1010 "uid_profile" => ["uid", "profile"],
1011 "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
1012 "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
1013 "resource-id" => ["resource-id"],
1017 "comment" => "Structure for all posts",
1019 "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"],
1020 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1021 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1022 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1023 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1024 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1025 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1026 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1027 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1028 "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"],
1029 "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"],
1030 "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"],
1031 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1032 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1033 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1034 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1035 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1036 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"]
1039 "PRIMARY" => ["uri-id"],
1040 "parent-uri-id" => ["parent-uri-id"],
1041 "thr-parent-id" => ["thr-parent-id"],
1042 "external-id" => ["external-id"],
1043 "owner-id" => ["owner-id"],
1044 "author-id" => ["author-id"],
1045 "causer-id" => ["causer-id"],
1049 "post-category" => [
1050 "comment" => "post relation to categories",
1052 "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"],
1053 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1054 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1055 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1058 "PRIMARY" => ["uri-id", "uid", "type", "tid"],
1059 "uri-id" => ["tid"],
1064 "comment" => "Content for all posts",
1066 "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"],
1067 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1068 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1069 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1070 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1071 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1072 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1073 "language" => ["type" => "text", "comment" => "Language information about this post"],
1074 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1075 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1076 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1077 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1078 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1079 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1080 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1081 "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"],
1082 "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1085 "PRIMARY" => ["uri-id"],
1086 "plink" => ["plink(191)"],
1087 "resource-id" => ["resource-id"],
1088 "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
1091 "post-delivery-data" => [
1092 "comment" => "Delivery data for items",
1094 "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"],
1095 "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"],
1096 "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
1097 "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
1098 "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
1099 "queue_failed" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of unsuccessful deliveries, used as item.delivery_queue_failed"],
1100 "activitypub" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via ActivityPub"],
1101 "dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via DFRN"],
1102 "legacy_dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via legacy DFRN"],
1103 "diaspora" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via Diaspora"],
1104 "ostatus" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via OStatus"],
1107 "PRIMARY" => ["uri-id"],
1111 "comment" => "Attached media",
1113 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1114 "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"],
1115 "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "Media URL"],
1116 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
1117 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1118 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1119 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1120 "size" => ["type" => "int unsigned", "comment" => "Media size"],
1121 "preview" => ["type" => "varbinary(255)", "comment" => "Preview URL"],
1122 "preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
1123 "preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
1124 "description" => ["type" => "text", "comment" => ""],
1125 "name" => ["type" => "varchar(255)", "comment" => "Name of the media"],
1126 "author-url" => ["type" => "varbinary(255)", "comment" => "URL of the author of the media"],
1127 "author-name" => ["type" => "varchar(255)", "comment" => "Name of the author of the media"],
1128 "author-image" => ["type" => "varbinary(255)", "comment" => "Image of the author of the media"],
1129 "publisher-url" => ["type" => "varbinary(255)", "comment" => "URL of the publisher of the media"],
1130 "publisher-name" => ["type" => "varchar(255)", "comment" => "Name of the publisher of the media"],
1131 "publisher-image" => ["type" => "varbinary(255)", "comment" => "Image of the publisher of the media"],
1134 "PRIMARY" => ["id"],
1135 "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1139 "comment" => "post relation to tags",
1141 "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"],
1142 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1143 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1144 "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"],
1147 "PRIMARY" => ["uri-id", "type", "tid", "cid"],
1153 "comment" => "Thread related data",
1155 "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"],
1156 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1157 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1158 "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"],
1159 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1160 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1161 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1162 "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"],
1163 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1166 "PRIMARY" => ["uri-id"],
1167 "owner-id" => ["owner-id"],
1168 "author-id" => ["author-id"],
1169 "causer-id" => ["causer-id"],
1170 "received" => ["received"],
1171 "commented" => ["commented"],
1175 "comment" => "User specific post data",
1177 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
1178 "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"],
1179 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1180 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1181 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1182 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1183 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1184 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1185 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1186 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1187 "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"],
1188 "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"],
1189 "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"],
1190 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1191 "post-reason" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Reason why the post arrived at the user"],
1192 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1193 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1194 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1195 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1196 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"],
1197 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1198 "protocol" => ["type" => "tinyint unsigned", "comment" => "Protocol used to deliver the item for this user"],
1199 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1200 "event-id" => ["type" => "int unsigned", "foreign" => ["event" => "id"], "comment" => "Used to link to the event.id"],
1201 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1202 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1203 "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1204 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1205 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1206 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1209 "PRIMARY" => ["id"],
1210 "uid_uri-id" => ["UNIQUE", "uid", "uri-id"],
1211 "uri-id" => ["uri-id"],
1212 "parent-uri-id" => ["parent-uri-id"],
1213 "thr-parent-id" => ["thr-parent-id"],
1214 "external-id" => ["external-id"],
1215 "owner-id" => ["owner-id"],
1216 "author-id" => ["author-id"],
1217 "causer-id" => ["causer-id"],
1219 "contact-id" => ["contact-id"],
1220 "event-id" => ["event-id"],
1222 "author-id_uid" => ["author-id", "uid"],
1223 "author-id_received" => ["author-id", "received"],
1224 "parent-uri-id_uid" => ["parent-uri-id", "uid"],
1225 "uid_contactid" => ["uid", "contact-id"],
1226 "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
1227 "uid_unseen" => ["uid", "unseen"],
1228 "uid_hidden_uri-id" => ["uid", "hidden", "uri-id"],
1231 "post-thread-user" => [
1232 "comment" => "Thread related data per user",
1234 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1235 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1236 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1237 "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"],
1238 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1239 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1240 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1241 "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"],
1242 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1243 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1244 "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The thread is pinned on the profile page"],
1245 "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1246 "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"],
1247 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1248 "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1249 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1250 "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1251 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1252 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1253 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1254 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1255 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1256 "post-user-id" => ["type" => "int unsigned", "foreign" => ["post-user" => "id"], "comment" => "Id of the post-user table"],
1259 "PRIMARY" => ["uid", "uri-id"],
1260 "uri-id" => ["uri-id"],
1261 "owner-id" => ["owner-id"],
1262 "author-id" => ["author-id"],
1263 "causer-id" => ["causer-id"],
1265 "contact-id" => ["contact-id"],
1267 "post-user-id" => ["post-user-id"],
1268 "commented" => ["commented"],
1269 "uid_received" => ["uid", "received"],
1270 "uid_pinned" => ["uid", "pinned"],
1271 "uid_commented" => ["uid", "commented"],
1272 "uid_starred" => ["uid", "starred"],
1273 "uid_mention" => ["uid", "mention"],
1276 "post-user-notification" => [
1277 "comment" => "User post notifications",
1279 "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"],
1280 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1281 "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1284 "PRIMARY" => ["uid", "uri-id"],
1285 "uri-id" => ["uri-id"],
1289 "comment" => "Currently running system processes",
1291 "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => ""],
1292 "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
1293 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1296 "PRIMARY" => ["pid"],
1297 "command" => ["command"],
1301 "comment" => "user profiles data",
1303 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1304 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1305 "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1306 "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
1307 "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
1308 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1309 "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1310 "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
1311 "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1312 "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1313 "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1314 "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1315 "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1316 "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1317 "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
1318 "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1319 "with" => ["type" => "text", "comment" => "Deprecated"],
1320 "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
1321 "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1322 "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1323 "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1324 "pub_keywords" => ["type" => "text", "comment" => ""],
1325 "prv_keywords" => ["type" => "text", "comment" => ""],
1326 "likes" => ["type" => "text", "comment" => "Deprecated"],
1327 "dislikes" => ["type" => "text", "comment" => "Deprecated"],
1328 "about" => ["type" => "text", "comment" => "Profile description"],
1329 "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1330 "music" => ["type" => "text", "comment" => "Deprecated"],
1331 "book" => ["type" => "text", "comment" => "Deprecated"],
1332 "tv" => ["type" => "text", "comment" => "Deprecated"],
1333 "film" => ["type" => "text", "comment" => "Deprecated"],
1334 "interest" => ["type" => "text", "comment" => "Deprecated"],
1335 "romance" => ["type" => "text", "comment" => "Deprecated"],
1336 "work" => ["type" => "text", "comment" => "Deprecated"],
1337 "education" => ["type" => "text", "comment" => "Deprecated"],
1338 "contact" => ["type" => "text", "comment" => "Deprecated"],
1339 "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1340 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1341 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1342 "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1343 "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
1344 "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
1347 "PRIMARY" => ["id"],
1348 "uid_is-default" => ["uid", "is-default"],
1349 "pub_keywords" => ["FULLTEXT", "pub_keywords"],
1352 "profile_check" => [
1353 "comment" => "DFRN remote auth use",
1355 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1356 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1357 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1358 "dfrn_id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1359 "sec" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1360 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1363 "PRIMARY" => ["id"],
1368 "profile_field" => [
1369 "comment" => "Custom profile fields",
1371 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1372 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner user id"],
1373 "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
1374 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this profile field - 0 = public"],
1375 "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
1376 "value" => ["type" => "text", "comment" => "Value of the field"],
1377 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
1378 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
1381 "PRIMARY" => ["id"],
1383 "order" => ["order"],
1387 "push_subscriber" => [
1388 "comment" => "Used for OStatus: Contains feed subscribers",
1390 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1391 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1392 "callback_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1393 "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1394 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1395 "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1396 "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
1397 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1398 "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
1399 "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1402 "PRIMARY" => ["id"],
1403 "next_try" => ["next_try"],
1408 "comment" => "registrations requiring admin approval",
1410 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1411 "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1412 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1413 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1414 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1415 "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1416 "note" => ["type" => "text", "comment" => ""],
1419 "PRIMARY" => ["id"],
1426 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1427 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1428 "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1431 "PRIMARY" => ["id"],
1432 "uid_term" => ["uid", "term(64)"],
1433 "term" => ["term(64)"]
1437 "comment" => "web session storage",
1439 "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1440 "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1441 "data" => ["type" => "text", "comment" => ""],
1442 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1445 "PRIMARY" => ["id"],
1446 "sid" => ["sid(64)"],
1447 "expire" => ["expire"],
1451 "comment" => "Data stored by Database storage backend",
1453 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1454 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]
1461 "comment" => "OAuth usage",
1463 "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
1464 "secret" => ["type" => "text", "comment" => ""],
1465 "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "foreign" => ["clients" => "client_id"]],
1466 "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
1467 "scope" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
1468 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1471 "PRIMARY" => ["id"],
1472 "client_id" => ["client_id"],
1477 "comment" => "Deleted usernames",
1479 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1480 "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
1483 "PRIMARY" => ["id"],
1484 "username" => ["username(32)"],
1488 "comment" => "User specific public contact data",
1490 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
1491 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1492 "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
1493 "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
1494 "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"]
1497 "PRIMARY" => ["uid", "cid"],
1502 "comment" => "Inter process communication between the frontend and the worker",
1504 "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
1505 "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
1508 "PRIMARY" => ["key"],
1510 "engine" => "MEMORY",
1513 "comment" => "Background tasks queue entries",
1515 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
1516 "command" => ["type" => "varchar(100)", "comment" => "Task command"],
1517 "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
1518 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
1519 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
1520 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
1521 "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
1522 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1523 "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1524 "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
1527 "PRIMARY" => ["id"],
1528 "command" => ["command"],
1529 "done_command_parameter" => ["done", "command", "parameter(64)"],
1530 "done_executed" => ["done", "executed"],
1531 "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
1532 "done_priority_next_try" => ["done", "priority", "next_try"],
1533 "done_pid_next_try" => ["done", "pid", "next_try"],
1534 "done_pid_retrial" => ["done", "pid", "retrial"],
1535 "done_pid_priority_created" => ["done", "pid", "priority", "created"]