3 * @copyright Copyright (C) 2020, Friendica
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" simulates this behaviour.
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', 1403);
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"],
97 "comment" => "The local users",
99 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
100 "parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"],
101 "comment" => "The parent user that has full control about this user"],
102 "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
103 "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
104 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
105 "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
106 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
107 "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
108 "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
109 "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
110 "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
111 "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
112 "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
113 "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
114 "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
115 "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
116 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
117 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
118 "spubkey" => ["type" => "text", "comment" => ""],
119 "sprvkey" => ["type" => "text", "comment" => ""],
120 "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
121 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
122 "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
123 "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
124 "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
125 "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
126 "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
127 "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
128 "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
129 "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
130 "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
131 "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
132 "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
133 "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
134 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
135 "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
136 "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
137 "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
138 "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
139 "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
140 "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
141 "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
142 "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
143 "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
144 "openidserver" => ["type" => "text", "comment" => ""],
147 "PRIMARY" => ["uid"],
148 "nickname" => ["nickname(32)"],
149 "parent-uid" => ["parent-uid"],
153 "comment" => "contact table",
155 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
156 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
157 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
158 "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"],
159 "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
160 "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
161 "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
162 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
163 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network of the contact"],
164 "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"],
165 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
166 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
167 "location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
168 "about" => ["type" => "text", "comment" => ""],
169 "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
170 "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
171 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
172 "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
173 "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
174 "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"],
175 "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
176 "micro" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
177 "site-pubkey" => ["type" => "text", "comment" => ""],
178 "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
179 "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
180 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
181 "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
182 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
183 "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
184 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
185 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
186 "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
187 "request" => ["type" => "varchar(255)", "comment" => ""],
188 "notify" => ["type" => "varchar(255)", "comment" => ""],
189 "poll" => ["type" => "varchar(255)", "comment" => ""],
190 "confirm" => ["type" => "varchar(255)", "comment" => ""],
191 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
192 "poco" => ["type" => "varchar(255)", "comment" => ""],
193 "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
194 "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
195 "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
196 "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
197 "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
198 "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
199 "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
200 "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
201 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
202 "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
203 "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
204 "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
205 "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
206 "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
207 "last-discovery" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last follower discovery"],
208 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
209 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Node-wide block status"],
210 "block_reason" => ["type" => "text", "comment" => "Node-wide block reason"],
211 "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
212 "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
213 "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum"],
214 "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group"],
215 "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
216 "manually-approve" => ["type" => "boolean", "comment" => ""],
217 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
218 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
219 "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
220 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
221 "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
222 "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"],
223 "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"],
224 "baseurl" => ["type" => "varchar(255)", "default" => "", "comment" => "baseurl of the contact"],
225 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
226 "reason" => ["type" => "text", "comment" => ""],
227 "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""],
228 "info" => ["type" => "mediumtext", "comment" => ""],
229 "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
230 "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
231 "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
232 "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
233 "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
234 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
238 "uid_name" => ["uid", "name(190)"],
239 "self_uid" => ["self", "uid"],
240 "alias_uid" => ["alias(128)", "uid"],
241 "pending_uid" => ["pending", "uid"],
242 "blocked_uid" => ["blocked", "uid"],
243 "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
244 "uid_network_batch" => ["uid", "network", "batch(64)"],
245 "addr_uid" => ["addr(128)", "uid"],
246 "nurl_uid" => ["nurl(128)", "uid"],
247 "nick_uid" => ["nick(128)", "uid"],
248 "attag_uid" => ["attag(96)", "uid"],
249 "dfrn-id" => ["dfrn-id(64)"],
250 "issued-id" => ["issued-id(64)"],
251 "network_uid_lastupdate" => ["network", "uid", "last-update"],
252 "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
253 "uid_lastitem" => ["uid", "last-item"],
258 "comment" => "URI and GUID for items",
260 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
261 "uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
262 "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
266 "uri" => ["UNIQUE", "uri"],
271 "comment" => "tags and mentions",
273 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
274 "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
275 "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""]
279 "type_name_url" => ["UNIQUE", "name", "url"],
284 "comment" => "OAuth usage",
286 "client_id" => ["type" => "varchar(20)", "not null" => "1", "primary" => "1", "comment" => ""],
287 "pw" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => ""],
288 "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
289 "name" => ["type" => "text", "comment" => ""],
290 "icon" => ["type" => "text", "comment" => ""],
291 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
294 "PRIMARY" => ["client_id"],
301 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
302 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
303 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
304 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
305 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
306 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
310 "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["uid", "allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
314 "comment" => "Activity Verbs",
316 "id" => ["type" => "smallint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
317 "name" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""]
324 "2fa_app_specific_password" => [
325 "comment" => "Two-factor app-specific _password",
327 "id" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Password ID for revocation"],
328 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
329 "description" => ["type" => "varchar(255)", "comment" => "Description of the usage of the password"],
330 "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "comment" => "Hashed password"],
331 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the password was generated"],
332 "last_used" => ["type" => "datetime", "comment" => "Datetime the password was last used"],
336 "uid_description" => ["uid", "description(190)"],
339 "2fa_recovery_codes" => [
340 "comment" => "Two-factor authentication recovery codes",
342 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
343 "code" => ["type" => "varchar(50)", "not null" => "1", "primary" => "1", "comment" => "Recovery code string"],
344 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the code was generated"],
345 "used" => ["type" => "datetime", "comment" => "Datetime the code was used"],
348 "PRIMARY" => ["uid", "code"]
351 "2fa_trusted_browser" => [
352 "comment" => "Two-factor authentication trusted browsers",
354 "cookie_hash" => ["type" => "varchar(80)", "not null" => "1", "primary" => "1", "comment" => "Trusted cookie hash"],
355 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
356 "user_agent" => ["type" => "text", "comment" => "User agent string"],
357 "created" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the trusted browser was recorded"],
358 "last_used" => ["type" => "datetime", "comment" => "Datetime the trusted browser was last used"],
361 "PRIMARY" => ["cookie_hash"],
366 "comment" => "registered addons",
368 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
369 "name" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "addon base (file)name"],
370 "version" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "currently unused"],
371 "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently always 1"],
372 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently unused"],
373 "timestamp" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "file timestamp to check for reloads"],
374 "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = has admin config, 0 = has no admin config"],
378 "name" => ["UNIQUE", "name"],
382 "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
384 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
385 "uuid" => ["type" => "varchar(255)", "comment" => ""],
386 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
387 "following" => ["type" => "varchar(255)", "comment" => ""],
388 "followers" => ["type" => "varchar(255)", "comment" => ""],
389 "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
390 "outbox" => ["type" => "varchar(255)", "comment" => ""],
391 "sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
392 "manually-approve" => ["type" => "boolean", "comment" => ""],
393 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
394 "name" => ["type" => "varchar(255)", "comment" => ""],
395 "about" => ["type" => "text", "comment" => ""],
396 "photo" => ["type" => "varchar(255)", "comment" => ""],
397 "addr" => ["type" => "varchar(255)", "comment" => ""],
398 "alias" => ["type" => "varchar(255)", "comment" => ""],
399 "pubkey" => ["type" => "text", "comment" => ""],
400 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
401 "baseurl" => ["type" => "varchar(255)", "comment" => "baseurl of the ap contact"],
402 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
403 "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
404 "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
405 "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
406 "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
407 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
410 "PRIMARY" => ["url"],
411 "addr" => ["addr(32)"],
412 "alias" => ["alias(190)"],
413 "followers" => ["followers(190)"],
414 "baseurl" => ["baseurl(190)"],
415 "sharedinbox" => ["sharedinbox(190)"],
420 "comment" => "file attachments",
422 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
423 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
424 "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
425 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
426 "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
427 "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
428 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
429 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
430 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
431 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
432 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
433 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
434 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
435 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
436 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
444 "comment" => "OAuth usage",
446 "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
447 "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "foreign" => ["clients" => "client_id"],
449 "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
450 "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
451 "scope" => ["type" => "varchar(250)", "not null" => "1", "default" => "", "comment" => ""],
455 "client_id" => ["client_id"]
459 "comment" => "Stores temporary data",
461 "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
462 "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
463 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
464 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
468 "k_expires" => ["k", "expires"],
474 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
475 "challenge" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
476 "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
477 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
478 "type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
479 "last_update" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
486 "comment" => "main configuration storage",
488 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
489 "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
490 "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
491 "v" => ["type" => "mediumtext", "comment" => ""],
495 "cat_k" => ["UNIQUE", "cat", "k"],
498 "contact-relation" => [
499 "comment" => "Contact relations",
501 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "contact the related contact had interacted with"],
502 "relation-cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "related contact who had interacted with the contact"],
503 "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction"],
504 "follow-updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last update of the contact relationship"],
505 "follows" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
508 "PRIMARY" => ["cid", "relation-cid"],
509 "relation-cid" => ["relation-cid"],
513 "comment" => "private messages",
515 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
516 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
517 "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
518 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
519 "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
520 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
521 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
522 "subject" => ["type" => "text", "comment" => "subject of initial message"],
530 "comment" => "Raw data and structure information for messages",
532 "item-uri" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "Original URI of the item - unrelated to the table with the same name"],
533 "reply-to-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "URI to which this item is a reply"],
534 "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation URI"],
535 "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation link"],
536 "protocol" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "255", "comment" => "The protocol of the item"],
537 "direction" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "How the message arrived here: 1=push, 2=pull"],
538 "source" => ["type" => "mediumtext", "comment" => "Original source"],
539 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Receiving date"],
542 "PRIMARY" => ["item-uri"],
543 "conversation-uri" => ["conversation-uri"],
544 "received" => ["received"],
548 "comment" => "Posts that are about to be distributed at a later time",
550 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
551 "uri" => ["type" => "varchar(255)", "comment" => "URI of the post that will be distributed later"],
552 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
553 "delayed" => ["type" => "datetime", "comment" => "delay time"],
557 "uid_uri" => ["UNIQUE", "uid", "uri(190)"],
560 "diaspora-interaction" => [
561 "comment" => "Signed Diaspora Interaction",
563 "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"],
564 "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
567 "PRIMARY" => ["uri-id"]
571 "comment" => "Events",
573 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
574 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
575 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
576 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
577 "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
578 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
579 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
580 "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
581 "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
582 "summary" => ["type" => "text", "comment" => "short description or title of the event"],
583 "desc" => ["type" => "text", "comment" => "event description"],
584 "location" => ["type" => "text", "comment" => "event location"],
585 "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
586 "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
587 "adjust" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "adjust to timezone of the recipient (0 or 1)"],
588 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
589 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
590 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
591 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
592 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
596 "uid_start" => ["uid", "start"],
601 "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
603 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
604 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "unique id"],
605 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
606 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
607 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
608 "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
609 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
610 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
611 "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
612 "notify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
613 "poll" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
614 "confirm" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
615 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
616 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
617 "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
618 "pubkey" => ["type" => "text", "comment" => ""],
619 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
623 "addr" => ["addr(32)"],
624 "url" => ["UNIQUE", "url(190)"],
628 "comment" => "friend suggestion stuff",
630 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
631 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
632 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
633 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
634 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
635 "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
636 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
637 "note" => ["type" => "text", "comment" => ""],
638 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
647 "comment" => "privacy groups, group info",
649 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
650 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
651 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
652 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
653 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
661 "comment" => "privacy groups, member info",
663 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
664 "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "groups.id of the associated group"],
665 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
669 "contactid" => ["contact-id"],
670 "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
674 "comment" => "Tags that the server has subscribed",
676 "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["gserver" => "id"], "primary" => "1",
677 "comment" => "The id of the gserver"],
678 "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
681 "PRIMARY" => ["gserver-id", "tag"],
686 "comment" => "addon hook registry",
688 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
689 "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
690 "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
691 "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
692 "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"],
696 "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
700 "comment" => "Hostname",
702 "id" => ["type" => "tinyint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
703 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "The hostname"],
707 "name" => ["UNIQUE", "name"],
711 "comment" => "Status of ActivityPub inboxes",
713 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
714 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
715 "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
716 "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
717 "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
718 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
719 "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
728 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
729 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
730 "fid" => ["type" => "int unsigned", "relation" => ["fcontact" => "id"], "comment" => ""],
731 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
732 "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
733 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
734 "note" => ["type" => "text", "comment" => ""],
735 "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
736 "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
737 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
738 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
742 "contact-id" => ["contact-id"],
749 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
750 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
751 "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
752 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
753 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
757 "name_expires" => ["name", "expires"]
761 "comment" => "private messages",
763 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
764 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
765 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
766 "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
767 "from-photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
768 "from-url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
769 "contact-id" => ["type" => "varchar(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"],
770 "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"],
771 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
772 "body" => ["type" => "mediumtext", "comment" => ""],
773 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
774 "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
775 "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
776 "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
777 "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
778 "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
779 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
783 "uid_seen" => ["uid", "seen"],
784 "convid" => ["convid"],
785 "uri" => ["uri(64)"],
786 "parent-uri" => ["parent-uri(64)"],
787 "contactid" => ["contact-id(32)"],
791 "comment" => "Mail account data for fetching mails",
793 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
794 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
795 "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
796 "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
797 "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
798 "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
799 "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
800 "pass" => ["type" => "text", "comment" => ""],
801 "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
802 "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
803 "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
804 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
805 "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
813 "comment" => "table of accounts that can manage each other",
815 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
816 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
817 "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
821 "uid_mid" => ["UNIQUE", "uid", "mid"],
826 "comment" => "notifications",
828 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
829 "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
830 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
831 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
832 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
833 "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
834 "msg" => ["type" => "mediumtext", "comment" => ""],
835 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
836 "link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
837 "iid" => ["type" => "int unsigned", "comment" => ""],
838 "parent" => ["type" => "int unsigned", "comment" => ""],
839 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
840 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
841 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
842 "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
843 "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
844 "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
845 "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
849 "seen_uid_date" => ["seen", "uid", "date"],
850 "uid_date" => ["uid", "date"],
851 "uid_type_link" => ["uid", "type", "link(190)"],
852 "uri-id" => ["uri-id"],
853 "parent-uri-id" => ["parent-uri-id"],
856 "notify-threads" => [
859 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
860 "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["notify" => "id"], "comment" => ""],
861 "master-parent-item" => ["type" => "int unsigned", "comment" => "Deprecated"],
862 "master-parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
863 "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
864 "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"],
865 "comment" => "User id"],
869 "master-parent-uri-id" => ["master-parent-uri-id"],
870 "receiver-uid" => ["receiver-uid"],
871 "notify-id" => ["notify-id"],
875 "comment" => "cache for OEmbed queries",
877 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
878 "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
879 "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
880 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
883 "PRIMARY" => ["url", "maxwidth"],
884 "created" => ["created"],
887 "openwebauth-token" => [
888 "comment" => "Store OpenWebAuth token to verify contacts",
890 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
891 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id - currently unused"],
892 "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
893 "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
894 "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
895 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
903 "comment" => "cache for 'parse_url' queries",
905 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
906 "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
907 "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
908 "content" => ["type" => "mediumtext", "comment" => "page data"],
909 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
912 "PRIMARY" => ["url", "guessing", "oembed"],
913 "created" => ["created"],
917 "comment" => "personal (per user) configuration storage",
919 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Primary key"],
920 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
921 "cat" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "Category"],
922 "k" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "Key"],
923 "v" => ["type" => "mediumtext", "comment" => "Value"],
927 "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
931 "comment" => "photo storage",
933 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
934 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid", "on delete" => "restrict"], "comment" => "Owner User id"],
935 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "contact.id"],
936 "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
937 "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
938 "hash" => ["type" => "char(32)", "comment" => "hash value of the photo"],
939 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
940 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
941 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
942 "desc" => ["type" => "text", "comment" => ""],
943 "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
944 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
945 "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
946 "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
947 "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
948 "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
949 "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
950 "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
951 "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
952 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
953 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
954 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
955 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
956 "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"],
957 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
958 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
959 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
963 "contactid" => ["contact-id"],
964 "uid_contactid" => ["uid", "contact-id"],
965 "uid_profile" => ["uid", "profile"],
966 "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
967 "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
968 "resource-id" => ["resource-id"],
972 "comment" => "Structure for all posts",
974 "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"],
975 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
976 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
977 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
978 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
979 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
980 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
981 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
982 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
983 "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"],
984 "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"],
985 "causer-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 contact that caused the item creation"],
986 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"],
987 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
988 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
989 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
990 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
991 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"]
994 "PRIMARY" => ["uri-id"],
995 "parent-uri-id" => ["parent-uri-id"],
996 "thr-parent-id" => ["thr-parent-id"],
997 "external-id" => ["external-id"],
998 "owner-id" => ["owner-id"],
999 "author-id" => ["author-id"],
1000 "causer-id" => ["causer-id"],
1002 "received" => ["received"],
1005 "post-category" => [
1006 "comment" => "post relation to categories",
1008 "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"],
1009 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1010 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1011 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1014 "PRIMARY" => ["uri-id", "uid", "type", "tid"],
1015 "uri-id" => ["tid"],
1020 "comment" => "Content for all posts",
1022 "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"],
1023 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1024 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1025 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1026 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1027 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1028 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1029 "language" => ["type" => "text", "comment" => "Language information about this post"],
1030 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1031 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1032 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1033 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1034 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1035 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1036 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1037 "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"],
1038 "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1041 "PRIMARY" => ["uri-id"],
1042 "plink" => ["plink(191)"],
1043 "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
1046 "post-delivery-data" => [
1047 "comment" => "Delivery data for items",
1049 "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"],
1050 "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"],
1051 "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
1052 "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
1053 "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
1054 "queue_failed" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of unsuccessful deliveries, used as item.delivery_queue_failed"],
1055 "activitypub" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via ActivityPub"],
1056 "dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via DFRN"],
1057 "legacy_dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via legacy DFRN"],
1058 "diaspora" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via Diaspora"],
1059 "ostatus" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via OStatus"],
1062 "PRIMARY" => ["uri-id"],
1066 "comment" => "Attached media",
1068 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1069 "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"],
1070 "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "Media URL"],
1071 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
1072 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1073 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1074 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1075 "size" => ["type" => "int unsigned", "comment" => "Media size"],
1076 "preview" => ["type" => "varbinary(255)", "comment" => "Preview URL"],
1077 "preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
1078 "preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
1079 "description" => ["type" => "text", "comment" => ""],
1082 "PRIMARY" => ["id"],
1083 "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1087 "comment" => "post relation to tags",
1089 "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"],
1090 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1091 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1092 "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"],
1095 "PRIMARY" => ["uri-id", "type", "tid", "cid"],
1101 "comment" => "Thread related data",
1103 "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"],
1104 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1105 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1106 "causer-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 contact that caused the item creation"],
1107 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1108 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1109 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1110 "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"],
1111 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1114 "PRIMARY" => ["uri-id"],
1115 "owner-id" => ["owner-id"],
1116 "author-id" => ["author-id"],
1117 "causer-id" => ["causer-id"],
1118 "received" => ["received"],
1119 "commented" => ["commented"],
1120 "changed" => ["changed"]
1124 "comment" => "User specific post data",
1126 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
1127 "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"],
1128 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1129 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1130 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1131 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1132 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1133 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1134 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1135 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1136 "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"],
1137 "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"],
1138 "causer-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 contact that caused the item creation"],
1139 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"],
1140 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1141 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1142 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1143 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1144 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"],
1145 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1146 "protocol" => ["type" => "tinyint unsigned", "comment" => "Protocol used to deliver the item for this user"],
1147 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1148 "event-id" => ["type" => "int unsigned", "foreign" => ["event" => "id"], "comment" => "Used to link to the event.id"],
1149 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1150 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1151 "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1152 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1153 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1154 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1157 "PRIMARY" => ["id"],
1158 "uid_uri-id" => ["UNIQUE", "uid", "uri-id"],
1159 "uri-id" => ["uri-id"],
1160 "contact-id" => ["contact-id"],
1162 "uid_hidden" => ["uid", "hidden"],
1163 "event-id" => ["event-id"],
1164 "uid_wall" => ["uid", "wall"],
1165 "parent-uri-id_uid" => ["parent-uri-id", "uid"],
1166 "thr-parent-id" => ["thr-parent-id"],
1167 "external-id" => ["external-id"],
1168 "owner-id" => ["owner-id"],
1169 "author-id_uid" => ["author-id", "uid"],
1170 "causer-id" => ["causer-id"],
1172 "uid_received" => ["uid", "received"],
1173 "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
1174 "uid_network_received" => ["uid", "network", "received"],
1175 "uid_contactid_received" => ["uid", "contact-id", "received"],
1176 "authorid_received" => ["author-id", "received"],
1177 "uid_unseen_wall" => ["uid", "unseen", "wall"],
1178 "uid_eventid" => ["uid", "event-id"],
1179 "psid_wall" => ["psid", "wall"],
1182 "post-thread-user" => [
1183 "comment" => "Thread related data per user",
1185 "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"],
1186 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1187 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1188 "causer-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 contact that caused the item creation"],
1189 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1190 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1191 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1192 "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"],
1193 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1194 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1195 "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The thread is pinned on the profile page"],
1196 "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1197 "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"],
1198 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1199 "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1200 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1201 "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1202 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1203 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1204 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
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"],
1207 "post-user-id" => ["type" => "int unsigned", "foreign" => ["post-user" => "id"], "comment" => "Id of the post-user table"],
1210 "PRIMARY" => ["uid", "uri-id"],
1211 "uid_wall" => ["uid", "wall"],
1212 "uid_pinned" => ["uid", "pinned"],
1213 "uri-id" => ["uri-id"],
1214 "contact-id" => ["contact-id"],
1216 "post-user-id" => ["post-user-id"],
1217 "owner-id" => ["owner-id"],
1218 "causer-id" => ["causer-id"],
1219 "uid_received" => ["uid", "received"],
1220 "uid_commented" => ["uid", "commented"],
1221 "uid_changed" => ["uid", "changed"],
1222 "uid_contact-id" => ["uid", "contact-id", "received"],
1223 "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
1224 "uid_network_received" => ["uid", "network", "received"],
1225 "uid_network_commented" => ["uid", "network", "commented"],
1226 "uid_contact-id_received" => ["uid", "contact-id", "received"],
1227 "author-id_received" => ["author-id", "received"],
1228 "uid_wall_changed" => ["uid", "wall", "changed"],
1229 "uid_unseen_wall" => ["uid", "unseen", "wall"],
1230 "mention_uid" => ["mention", "uid"],
1231 "psid_wall" => ["psid", "wall"],
1232 "received" => ["received"],
1233 "commented" => ["commented"],
1234 "changed" => ["changed"],
1237 "post-user-notification" => [
1238 "comment" => "User post notifications",
1240 "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"],
1241 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1242 "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1245 "PRIMARY" => ["uid", "uri-id"],
1246 "uri-id" => ["uri-id"],
1250 "comment" => "Currently running system processes",
1252 "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => ""],
1253 "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
1254 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1257 "PRIMARY" => ["pid"],
1258 "command" => ["command"],
1262 "comment" => "user profiles data",
1264 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1265 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1266 "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1267 "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
1268 "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
1269 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1270 "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1271 "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
1272 "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1273 "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1274 "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1275 "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1276 "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1277 "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1278 "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
1279 "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1280 "with" => ["type" => "text", "comment" => "Deprecated"],
1281 "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
1282 "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1283 "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1284 "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1285 "pub_keywords" => ["type" => "text", "comment" => ""],
1286 "prv_keywords" => ["type" => "text", "comment" => ""],
1287 "likes" => ["type" => "text", "comment" => "Deprecated"],
1288 "dislikes" => ["type" => "text", "comment" => "Deprecated"],
1289 "about" => ["type" => "text", "comment" => "Profile description"],
1290 "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1291 "music" => ["type" => "text", "comment" => "Deprecated"],
1292 "book" => ["type" => "text", "comment" => "Deprecated"],
1293 "tv" => ["type" => "text", "comment" => "Deprecated"],
1294 "film" => ["type" => "text", "comment" => "Deprecated"],
1295 "interest" => ["type" => "text", "comment" => "Deprecated"],
1296 "romance" => ["type" => "text", "comment" => "Deprecated"],
1297 "work" => ["type" => "text", "comment" => "Deprecated"],
1298 "education" => ["type" => "text", "comment" => "Deprecated"],
1299 "contact" => ["type" => "text", "comment" => "Deprecated"],
1300 "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1301 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1302 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1303 "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1304 "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
1305 "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
1308 "PRIMARY" => ["id"],
1309 "uid_is-default" => ["uid", "is-default"],
1310 "pub_keywords" => ["FULLTEXT", "pub_keywords"],
1313 "profile_check" => [
1314 "comment" => "DFRN remote auth use",
1316 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1317 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1318 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1319 "dfrn_id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1320 "sec" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1321 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1324 "PRIMARY" => ["id"],
1329 "profile_field" => [
1330 "comment" => "Custom profile fields",
1332 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1333 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner user id"],
1334 "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
1335 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this profile field - 0 = public"],
1336 "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
1337 "value" => ["type" => "text", "comment" => "Value of the field"],
1338 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
1339 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
1342 "PRIMARY" => ["id"],
1344 "order" => ["order"],
1348 "push_subscriber" => [
1349 "comment" => "Used for OStatus: Contains feed subscribers",
1351 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1352 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1353 "callback_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1354 "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1355 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1356 "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1357 "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
1358 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1359 "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
1360 "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1363 "PRIMARY" => ["id"],
1364 "next_try" => ["next_try"],
1369 "comment" => "registrations requiring admin approval",
1371 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1372 "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1373 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1374 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1375 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1376 "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1377 "note" => ["type" => "text", "comment" => ""],
1380 "PRIMARY" => ["id"],
1387 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1388 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1389 "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1392 "PRIMARY" => ["id"],
1397 "comment" => "web session storage",
1399 "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1400 "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1401 "data" => ["type" => "text", "comment" => ""],
1402 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1405 "PRIMARY" => ["id"],
1406 "sid" => ["sid(64)"],
1407 "expire" => ["expire"],
1411 "comment" => "Data stored by Database storage backend",
1413 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1414 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]
1421 "comment" => "OAuth usage",
1423 "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
1424 "secret" => ["type" => "text", "comment" => ""],
1425 "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "foreign" => ["clients" => "client_id"]],
1426 "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
1427 "scope" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
1428 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1431 "PRIMARY" => ["id"],
1432 "client_id" => ["client_id"],
1437 "comment" => "Deleted usernames",
1439 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1440 "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
1443 "PRIMARY" => ["id"],
1444 "username" => ["username(32)"],
1448 "comment" => "User specific public contact data",
1450 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
1451 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1452 "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
1453 "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
1454 "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"]
1457 "PRIMARY" => ["uid", "cid"],
1462 "comment" => "Inter process communication between the frontend and the worker",
1464 "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
1465 "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
1468 "PRIMARY" => ["key"],
1470 "engine" => "MEMORY",
1473 "comment" => "Background tasks queue entries",
1475 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
1476 "command" => ["type" => "varchar(100)", "comment" => "Task command"],
1477 "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
1478 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
1479 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
1480 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
1481 "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
1482 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1483 "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1484 "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
1487 "PRIMARY" => ["id"],
1488 "command" => ["command"],
1489 "done_command_parameter" => ["done", "command", "parameter(64)"],
1490 "done_executed" => ["done", "executed"],
1491 "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
1492 "done_priority_next_try" => ["done", "priority", "next_try"],
1493 "done_pid_next_try" => ["done", "pid", "next_try"],
1494 "done_pid_retrial" => ["done", "pid", "retrial"],
1495 "done_pid_priority_created" => ["done", "pid", "priority", "created"]