3 * @copyright Copyright (C) 2010-2021, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 * Main database structure configuration file.
22 * Here are described all the tables, fields and indexes Friendica needs to work.
23 * The entry order is mostly alphabetic - with the exception of tables that are used in foreign keys.
25 * Syntax (braces indicate optionale values):
27 * "comment" => "Description of the table",
30 * "type" => "<field type>{(<field size>)} <unsigned>",
32 * {"extra" => "auto_increment",}
33 * {"default" => "<default value>",}
34 * {"default" => NULL_DATE,} (for datetime fields)
36 * {"foreign|relation" => ["<foreign key table name>" => "<foreign key field name>"],}
37 * "comment" => "Description of the fields"
42 * "PRIMARY" => ["<primary key field name>", ...],
43 * "<index name>" => [{"UNIQUE",} "<field name>{(<key size>)}", ...]
48 * Whenever possible prefer "foreign" before "relation" with the foreign keys.
49 * "foreign" adds true foreign keys on the database level, while "relation" is just an indicator of a table relation without any consequences
51 * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value below.
55 use Friendica\Database\DBA;
57 if (!defined('DB_UPDATE_VERSION')) {
58 define('DB_UPDATE_VERSION', 1431);
64 "comment" => "Global servers",
66 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
67 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
68 "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
69 "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
70 "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
71 "info" => ["type" => "text", "comment" => ""],
72 "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
73 "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
74 "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
75 "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
76 "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
77 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
78 "protocol" => ["type" => "tinyint unsigned", "comment" => "The protocol of the server"],
79 "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
80 "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
81 "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
82 "detection-method" => ["type" => "tinyint unsigned", "comment" => "Method that had been used to detect that server"],
83 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
84 "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
85 "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last successful connection request"],
86 "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Last failed connection request"],
87 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
88 "next_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Next connection request"],
92 "nurl" => ["UNIQUE", "nurl(190)"],
93 "next_contact" => ["next_contact"],
94 "network" => ["network"],
98 "comment" => "The local users",
100 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
101 "parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"],
102 "comment" => "The parent user that has full control about this user"],
103 "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
104 "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
105 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
106 "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
107 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
108 "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
109 "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
110 "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
111 "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
112 "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
113 "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
114 "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
115 "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
116 "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
117 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
118 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
119 "spubkey" => ["type" => "text", "comment" => ""],
120 "sprvkey" => ["type" => "text", "comment" => ""],
121 "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
122 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
123 "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
124 "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
125 "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
126 "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
127 "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
128 "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
129 "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
130 "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
131 "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
132 "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
133 "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
134 "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
135 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
136 "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
137 "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
138 "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
139 "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
140 "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
141 "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
142 "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
143 "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
144 "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
145 "openidserver" => ["type" => "text", "comment" => ""],
148 "PRIMARY" => ["uid"],
149 "nickname" => ["nickname(32)"],
150 "parent-uid" => ["parent-uid"],
152 "email" => ["email(64)"],
156 "comment" => "URI and GUID for items",
158 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
159 "uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
160 "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
164 "uri" => ["UNIQUE", "uri"],
169 "comment" => "contact table",
171 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
172 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
173 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
174 "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => "Date of last contact update"],
175 "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
176 "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
177 "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
178 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
179 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network of the contact"],
180 "protocol" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Protocol of the contact"],
181 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
182 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
183 "location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
184 "about" => ["type" => "text", "comment" => ""],
185 "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
186 "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
187 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
188 "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
189 "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
190 "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"],
191 "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
192 "micro" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
193 "header" => ["type" => "varchar(255)", "comment" => "Header picture"],
194 "site-pubkey" => ["type" => "text", "comment" => "Deprecated"],
195 "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
196 "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
197 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
198 "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
199 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
200 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
201 "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
202 "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
203 "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
204 "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
205 "request" => ["type" => "varchar(255)", "comment" => ""],
206 "notify" => ["type" => "varchar(255)", "comment" => ""],
207 "poll" => ["type" => "varchar(255)", "comment" => ""],
208 "confirm" => ["type" => "varchar(255)", "comment" => ""],
209 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
210 "poco" => ["type" => "varchar(255)", "comment" => ""],
211 "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
212 "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
213 "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
214 "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
215 "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
216 "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
217 "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
218 "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
219 "failed" => ["type" => "boolean", "comment" => "Connection failed"],
220 "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
221 "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
222 "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
223 "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
224 "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
225 "last-discovery" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last follower discovery"],
226 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
227 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "Node-wide block status"],
228 "block_reason" => ["type" => "text", "comment" => "Node-wide block reason"],
229 "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
230 "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
231 "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum"],
232 "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group"],
233 "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
234 "manually-approve" => ["type" => "boolean", "comment" => ""],
235 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
236 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
237 "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
238 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
239 "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
240 "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"],
241 "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"],
242 "baseurl" => ["type" => "varchar(255)", "default" => "", "comment" => "baseurl of the contact"],
243 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
244 "reason" => ["type" => "text", "comment" => ""],
245 "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""],
246 "info" => ["type" => "mediumtext", "comment" => ""],
247 "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
248 "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
249 "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
250 "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
251 "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
252 "ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
256 "uid_name" => ["uid", "name(190)"],
257 "self_uid" => ["self", "uid"],
258 "alias_uid" => ["alias(128)", "uid"],
259 "pending_uid" => ["pending", "uid"],
260 "blocked_uid" => ["blocked", "uid"],
261 "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
262 "uid_network_batch" => ["uid", "network", "batch(64)"],
263 "batch_contact-type" => ["batch(64)", "contact-type"],
264 "addr_uid" => ["addr(128)", "uid"],
265 "nurl_uid" => ["nurl(128)", "uid"],
266 "nick_uid" => ["nick(128)", "uid"],
267 "attag_uid" => ["attag(96)", "uid"],
268 "network_uid_lastupdate" => ["network", "uid", "last-update"],
269 "uid_network_self_lastupdate" => ["uid", "network", "self", "last-update"],
270 "uid_lastitem" => ["uid", "last-item"],
271 "baseurl" => ["baseurl(64)"],
272 "uid_contact-type" => ["uid", "contact-type"],
273 "uid_self_contact-type" => ["uid", "self", "contact-type"],
274 "self_network_uid" => ["self", "network", "uid"],
276 "uri-id" => ["uri-id"],
280 "comment" => "tags and mentions",
282 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
283 "name" => ["type" => "varchar(96)", "not null" => "1", "default" => "", "comment" => ""],
284 "url" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""]
288 "type_name_url" => ["UNIQUE", "name", "url"],
295 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
296 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
297 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
298 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
299 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
300 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
304 "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["uid", "allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
308 "comment" => "Activity Verbs",
310 "id" => ["type" => "smallint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
311 "name" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""]
319 "2fa_app_specific_password" => [
320 "comment" => "Two-factor app-specific _password",
322 "id" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Password ID for revocation"],
323 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
324 "description" => ["type" => "varchar(255)", "comment" => "Description of the usage of the password"],
325 "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "comment" => "Hashed password"],
326 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the password was generated"],
327 "last_used" => ["type" => "datetime", "comment" => "Datetime the password was last used"],
331 "uid_description" => ["uid", "description(190)"],
334 "2fa_recovery_codes" => [
335 "comment" => "Two-factor authentication recovery codes",
337 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
338 "code" => ["type" => "varchar(50)", "not null" => "1", "primary" => "1", "comment" => "Recovery code string"],
339 "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the code was generated"],
340 "used" => ["type" => "datetime", "comment" => "Datetime the code was used"],
343 "PRIMARY" => ["uid", "code"]
346 "2fa_trusted_browser" => [
347 "comment" => "Two-factor authentication trusted browsers",
349 "cookie_hash" => ["type" => "varchar(80)", "not null" => "1", "primary" => "1", "comment" => "Trusted cookie hash"],
350 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
351 "user_agent" => ["type" => "text", "comment" => "User agent string"],
352 "created" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the trusted browser was recorded"],
353 "last_used" => ["type" => "datetime", "comment" => "Datetime the trusted browser was last used"],
356 "PRIMARY" => ["cookie_hash"],
361 "comment" => "registered addons",
363 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
364 "name" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "addon base (file)name"],
365 "version" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "currently unused"],
366 "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently always 1"],
367 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently unused"],
368 "timestamp" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "file timestamp to check for reloads"],
369 "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = has admin config, 0 = has no admin config"],
373 "installed_name" => ["installed", "name"],
374 "name" => ["UNIQUE", "name"],
378 "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
380 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
381 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the apcontact url"],
382 "uuid" => ["type" => "varchar(255)", "comment" => ""],
383 "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
384 "following" => ["type" => "varchar(255)", "comment" => ""],
385 "followers" => ["type" => "varchar(255)", "comment" => ""],
386 "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
387 "outbox" => ["type" => "varchar(255)", "comment" => ""],
388 "sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
389 "manually-approve" => ["type" => "boolean", "comment" => ""],
390 "discoverable" => ["type" => "boolean", "comment" => "Mastodon extension: true if profile is published in their directory"],
391 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
392 "name" => ["type" => "varchar(255)", "comment" => ""],
393 "about" => ["type" => "text", "comment" => ""],
394 "photo" => ["type" => "varchar(255)", "comment" => ""],
395 "header" => ["type" => "varchar(255)", "comment" => "Header picture"],
396 "addr" => ["type" => "varchar(255)", "comment" => ""],
397 "alias" => ["type" => "varchar(255)", "comment" => ""],
398 "pubkey" => ["type" => "text", "comment" => ""],
399 "subscribe" => ["type" => "varchar(255)", "comment" => ""],
400 "baseurl" => ["type" => "varchar(255)", "comment" => "baseurl of the ap contact"],
401 "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
402 "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
403 "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
404 "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
405 "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
406 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
409 "PRIMARY" => ["url"],
410 "addr" => ["addr(32)"],
411 "alias" => ["alias(190)"],
412 "followers" => ["followers(190)"],
413 "baseurl" => ["baseurl(190)"],
414 "sharedinbox" => ["sharedinbox(190)"],
416 "uri-id" => ["UNIQUE", "uri-id"],
420 "comment" => "OAuth application",
422 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
423 "client_id" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
424 "client_secret" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
425 "name" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
426 "redirect_uri" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
427 "website" => ["type" => "varchar(255)", "comment" => ""],
428 "scopes" => ["type" => "varchar(255)", "comment" => ""],
429 "read" => ["type" => "boolean", "comment" => "Read scope"],
430 "write" => ["type" => "boolean", "comment" => "Write scope"],
431 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
432 "push" => ["type" => "boolean", "comment" => "Push scope"],
436 "client_id" => ["UNIQUE", "client_id"]
439 "application-token" => [
440 "comment" => "OAuth user token",
442 "application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
443 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
444 "code" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
445 "access_token" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
446 "created_at" => ["type" => "datetime", "not null" => "1", "comment" => "creation time"],
447 "scopes" => ["type" => "varchar(255)", "comment" => ""],
448 "read" => ["type" => "boolean", "comment" => "Read scope"],
449 "write" => ["type" => "boolean", "comment" => "Write scope"],
450 "follow" => ["type" => "boolean", "comment" => "Follow scope"],
451 "push" => ["type" => "boolean", "comment" => "Push scope"],
454 "PRIMARY" => ["application-id", "uid"],
455 "uid_id" => ["uid", "application-id"],
459 "comment" => "file attachments",
461 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
462 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
463 "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
464 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
465 "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
466 "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
467 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
468 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
469 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
470 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
471 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
472 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
473 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
474 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
475 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
483 "comment" => "Stores temporary data",
485 "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
486 "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
487 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
488 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
492 "k_expires" => ["k", "expires"],
496 "comment" => "main configuration storage",
498 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
499 "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
500 "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
501 "v" => ["type" => "mediumtext", "comment" => ""],
505 "cat_k" => ["UNIQUE", "cat", "k"],
508 "contact-relation" => [
509 "comment" => "Contact relations",
511 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "contact the related contact had interacted with"],
512 "relation-cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "primary" => "1", "comment" => "related contact who had interacted with the contact"],
513 "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction"],
514 "follow-updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last update of the contact relationship"],
515 "follows" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
518 "PRIMARY" => ["cid", "relation-cid"],
519 "relation-cid" => ["relation-cid"],
523 "comment" => "private messages",
525 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
526 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
527 "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
528 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
529 "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
530 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
531 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
532 "subject" => ["type" => "text", "comment" => "subject of initial message"],
540 "comment" => "Raw data and structure information for messages",
542 "item-uri" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "Original URI of the item - unrelated to the table with the same name"],
543 "reply-to-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "URI to which this item is a reply"],
544 "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation URI"],
545 "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation link"],
546 "protocol" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "255", "comment" => "The protocol of the item"],
547 "direction" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "How the message arrived here: 1=push, 2=pull"],
548 "source" => ["type" => "mediumtext", "comment" => "Original source"],
549 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Receiving date"],
552 "PRIMARY" => ["item-uri"],
553 "conversation-uri" => ["conversation-uri"],
554 "received" => ["received"],
558 "comment" => "Background tasks queue entries",
560 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
561 "command" => ["type" => "varchar(100)", "comment" => "Task command"],
562 "parameter" => ["type" => "mediumtext", "comment" => "Task parameter"],
563 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
564 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
565 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
566 "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
567 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
568 "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
569 "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
573 "command" => ["command"],
574 "done_command_parameter" => ["done", "command", "parameter(64)"],
575 "done_executed" => ["done", "executed"],
576 "done_priority_retrial_created" => ["done", "priority", "retrial", "created"],
577 "done_priority_next_try" => ["done", "priority", "next_try"],
578 "done_pid_next_try" => ["done", "pid", "next_try"],
579 "done_pid_retrial" => ["done", "pid", "retrial"],
580 "done_pid_priority_created" => ["done", "pid", "priority", "created"]
584 "comment" => "Posts that are about to be distributed at a later time",
586 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
587 "uri" => ["type" => "varchar(255)", "comment" => "URI of the post that will be distributed later"],
588 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
589 "delayed" => ["type" => "datetime", "comment" => "delay time"],
590 "wid" => ["type" => "int unsigned", "foreign" => ["workerqueue" => "id"], "comment" => "Workerqueue id"],
594 "uid_uri" => ["UNIQUE", "uid", "uri(190)"],
598 "diaspora-interaction" => [
599 "comment" => "Signed Diaspora Interaction",
601 "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"],
602 "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
605 "PRIMARY" => ["uri-id"]
609 "comment" => "Events",
611 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
612 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
613 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
614 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
615 "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
616 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the event uri"],
617 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
618 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
619 "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
620 "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
621 "summary" => ["type" => "text", "comment" => "short description or title of the event"],
622 "desc" => ["type" => "text", "comment" => "event description"],
623 "location" => ["type" => "text", "comment" => "event location"],
624 "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
625 "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
626 "adjust" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "adjust to timezone of the recipient (0 or 1)"],
627 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
628 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
629 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
630 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
631 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
635 "uid_start" => ["uid", "start"],
637 "uri-id" => ["uri-id"],
641 "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
643 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
644 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "unique id"],
645 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
646 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the fcontact url"],
647 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
648 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
649 "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
650 "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
651 "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
652 "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
653 "notify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
654 "poll" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
655 "confirm" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
656 "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
657 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
658 "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
659 "pubkey" => ["type" => "text", "comment" => ""],
660 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
664 "addr" => ["addr(32)"],
665 "url" => ["UNIQUE", "url(190)"],
666 "uri-id" => ["UNIQUE", "uri-id"],
670 "comment" => "friend suggestion stuff",
672 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
673 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
674 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
675 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
676 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
677 "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
678 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
679 "note" => ["type" => "text", "comment" => ""],
680 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
689 "comment" => "privacy groups, group info",
691 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
692 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
693 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
694 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
695 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
703 "comment" => "privacy groups, member info",
705 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
706 "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "groups.id of the associated group"],
707 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
711 "contactid" => ["contact-id"],
712 "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
716 "comment" => "Tags that the server has subscribed",
718 "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["gserver" => "id"], "primary" => "1",
719 "comment" => "The id of the gserver"],
720 "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
723 "PRIMARY" => ["gserver-id", "tag"],
728 "comment" => "addon hook registry",
730 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
731 "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
732 "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
733 "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
734 "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"],
738 "priority" => ["priority"],
739 "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
743 "comment" => "Hostname",
745 "id" => ["type" => "tinyint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
746 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "The hostname"],
750 "name" => ["UNIQUE", "name"],
754 "comment" => "Status of ActivityPub inboxes",
756 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the inbox"],
757 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date of this entry"],
758 "success" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful delivery"],
759 "failure" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed delivery"],
760 "previous" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Previous delivery date"],
761 "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the inbox archived?"],
762 "shared" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is it a shared inbox?"]
771 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
772 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
773 "fid" => ["type" => "int unsigned", "relation" => ["fcontact" => "id"], "comment" => ""],
774 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
775 "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
776 "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
777 "note" => ["type" => "text", "comment" => ""],
778 "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
779 "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
780 "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
781 "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
785 "contact-id" => ["contact-id"],
792 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
793 "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
794 "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
795 "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
796 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
800 "name_expires" => ["name", "expires"]
804 "comment" => "private messages",
806 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
807 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
808 "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
809 "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
810 "from-photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
811 "from-url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
812 "contact-id" => ["type" => "varchar(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"],
813 "author-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of the mail"],
814 "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"],
815 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
816 "body" => ["type" => "mediumtext", "comment" => ""],
817 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
818 "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
819 "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
820 "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
821 "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
822 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related mail"],
823 "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
824 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related mail"],
825 "thr-parent" => ["type" => "varchar(255)", "comment" => ""],
826 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
827 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
831 "uid_seen" => ["uid", "seen"],
832 "convid" => ["convid"],
833 "uri" => ["uri(64)"],
834 "parent-uri" => ["parent-uri(64)"],
835 "contactid" => ["contact-id(32)"],
836 "author-id" => ["author-id"],
837 "uri-id" => ["uri-id"],
838 "parent-uri-id" => ["parent-uri-id"],
839 "thr-parent-id" => ["thr-parent-id"],
843 "comment" => "Mail account data for fetching mails",
845 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
846 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
847 "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
848 "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
849 "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
850 "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
851 "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
852 "pass" => ["type" => "text", "comment" => ""],
853 "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
854 "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
855 "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
856 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
857 "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
865 "comment" => "table of accounts that can manage each other",
867 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
868 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
869 "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
873 "uid_mid" => ["UNIQUE", "uid", "mid"],
878 "comment" => "notifications",
880 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
881 "uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
882 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
883 "type" => ["type" => "tinyint unsigned", "comment" => ""],
884 "actor-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the actor that caused the notification"],
885 "target-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
886 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
887 "created" => ["type" => "datetime", "comment" => ""],
888 "seen" => ["type" => "boolean", "default" => "0", "comment" => ""],
892 "uid_vid_type_actor-id_target-uri-id" => ["UNIQUE", "uid", "vid", "type", "actor-id", "target-uri-id"],
894 "actor-id" => ["actor-id"],
895 "target-uri-id" => ["target-uri-id"],
896 "parent-uri-id" => ["parent-uri-id"],
897 "seen_uid" => ["seen", "uid"],
901 "comment" => "notifications",
903 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
904 "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
905 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
906 "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
907 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
908 "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
909 "msg" => ["type" => "mediumtext", "comment" => ""],
910 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
911 "link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
912 "iid" => ["type" => "int unsigned", "comment" => ""],
913 "parent" => ["type" => "int unsigned", "comment" => ""],
914 "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the related post"],
915 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
916 "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
917 "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
918 "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
919 "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
920 "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
924 "seen_uid_date" => ["seen", "uid", "date"],
925 "uid_date" => ["uid", "date"],
926 "uid_type_link" => ["uid", "type", "link(190)"],
927 "uri-id" => ["uri-id"],
928 "parent-uri-id" => ["parent-uri-id"],
931 "notify-threads" => [
934 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
935 "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["notify" => "id"], "comment" => ""],
936 "master-parent-item" => ["type" => "int unsigned", "comment" => "Deprecated"],
937 "master-parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
938 "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
939 "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"],
940 "comment" => "User id"],
944 "master-parent-uri-id" => ["master-parent-uri-id"],
945 "receiver-uid" => ["receiver-uid"],
946 "notify-id" => ["notify-id"],
950 "comment" => "cache for OEmbed queries",
952 "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
953 "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
954 "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
955 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
958 "PRIMARY" => ["url", "maxwidth"],
959 "created" => ["created"],
962 "openwebauth-token" => [
963 "comment" => "Store OpenWebAuth token to verify contacts",
965 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
966 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id - currently unused"],
967 "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
968 "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
969 "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
970 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
978 "comment" => "cache for 'parse_url' queries",
980 "url_hash" => ["type" => "binary(64)", "not null" => "1", "primary" => "1", "comment" => "page url hash"],
981 "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
982 "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
983 "url" => ["type" => "text", "not null" => "1", "comment" => "page url"],
984 "content" => ["type" => "mediumtext", "comment" => "page data"],
985 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
986 "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of expiration"],
989 "PRIMARY" => ["url_hash", "guessing", "oembed"],
990 "created" => ["created"],
991 "expires" => ["expires"],
995 "comment" => "personal (per user) configuration storage",
997 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Primary key"],
998 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
999 "cat" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "Category"],
1000 "k" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "Key"],
1001 "v" => ["type" => "mediumtext", "comment" => "Value"],
1004 "PRIMARY" => ["id"],
1005 "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
1009 "comment" => "photo storage",
1011 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1012 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid", "on delete" => "restrict"], "comment" => "Owner User id"],
1013 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "contact.id"],
1014 "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
1015 "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
1016 "hash" => ["type" => "char(32)", "comment" => "hash value of the photo"],
1017 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
1018 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
1019 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1020 "desc" => ["type" => "text", "comment" => ""],
1021 "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
1022 "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1023 "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
1024 "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1025 "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1026 "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1027 "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
1028 "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1029 "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1030 "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
1031 "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
1032 "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
1033 "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
1034 "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"],
1035 "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
1036 "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
1037 "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1040 "PRIMARY" => ["id"],
1041 "contactid" => ["contact-id"],
1042 "uid_contactid" => ["uid", "contact-id"],
1043 "uid_profile" => ["uid", "profile"],
1044 "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
1045 "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
1046 "resource-id" => ["resource-id"],
1050 "comment" => "Structure for all posts",
1052 "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
1053 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1054 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1055 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1056 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1057 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1058 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1059 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1060 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1061 "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"],
1062 "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"],
1063 "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"],
1064 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1065 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1066 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1067 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1068 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1069 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"]
1072 "PRIMARY" => ["uri-id"],
1073 "parent-uri-id" => ["parent-uri-id"],
1074 "thr-parent-id" => ["thr-parent-id"],
1075 "external-id" => ["external-id"],
1076 "owner-id" => ["owner-id"],
1077 "author-id" => ["author-id"],
1078 "causer-id" => ["causer-id"],
1082 "post-category" => [
1083 "comment" => "post relation to categories",
1085 "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"],
1086 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1087 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1088 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1091 "PRIMARY" => ["uri-id", "uid", "type", "tid"],
1092 "uri-id" => ["tid"],
1097 "comment" => "Content for all posts",
1099 "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"],
1100 "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
1101 "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1102 "body" => ["type" => "mediumtext", "comment" => "item body content"],
1103 "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
1104 "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
1105 "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
1106 "language" => ["type" => "text", "comment" => "Language information about this post"],
1107 "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
1108 "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1109 "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
1110 "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
1111 "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
1112 "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
1113 "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
1114 "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"],
1115 "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
1118 "PRIMARY" => ["uri-id"],
1119 "plink" => ["plink(191)"],
1120 "resource-id" => ["resource-id"],
1121 "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
1124 "post-delivery-data" => [
1125 "comment" => "Delivery data for items",
1127 "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"],
1128 "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"],
1129 "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
1130 "queue_count" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Initial number of delivery recipients, used as item.delivery_queue_count"],
1131 "queue_done" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries, used as item.delivery_queue_done"],
1132 "queue_failed" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of unsuccessful deliveries, used as item.delivery_queue_failed"],
1133 "activitypub" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via ActivityPub"],
1134 "dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via DFRN"],
1135 "legacy_dfrn" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via legacy DFRN"],
1136 "diaspora" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via Diaspora"],
1137 "ostatus" => ["type" => "mediumint", "not null" => "1", "default" => "0", "comment" => "Number of successful deliveries via OStatus"],
1140 "PRIMARY" => ["uri-id"],
1144 "comment" => "Post related external links",
1146 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1147 "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"],
1148 "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "External URL"],
1149 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1152 "PRIMARY" => ["id"],
1153 "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1157 "comment" => "Attached media",
1159 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1160 "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"],
1161 "url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "Media URL"],
1162 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
1163 "mimetype" => ["type" => "varchar(60)", "comment" => ""],
1164 "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
1165 "width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
1166 "size" => ["type" => "int unsigned", "comment" => "Media size"],
1167 "preview" => ["type" => "varbinary(255)", "comment" => "Preview URL"],
1168 "preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
1169 "preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
1170 "description" => ["type" => "text", "comment" => ""],
1171 "name" => ["type" => "varchar(255)", "comment" => "Name of the media"],
1172 "author-url" => ["type" => "varbinary(255)", "comment" => "URL of the author of the media"],
1173 "author-name" => ["type" => "varchar(255)", "comment" => "Name of the author of the media"],
1174 "author-image" => ["type" => "varbinary(255)", "comment" => "Image of the author of the media"],
1175 "publisher-url" => ["type" => "varbinary(255)", "comment" => "URL of the publisher of the media"],
1176 "publisher-name" => ["type" => "varchar(255)", "comment" => "Name of the publisher of the media"],
1177 "publisher-image" => ["type" => "varbinary(255)", "comment" => "Image of the publisher of the media"],
1180 "PRIMARY" => ["id"],
1181 "uri-id-url" => ["UNIQUE", "uri-id", "url"],
1185 "comment" => "post relation to tags",
1187 "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"],
1188 "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
1189 "tid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["tag" => "id", "on delete" => "restrict"], "comment" => ""],
1190 "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"],
1193 "PRIMARY" => ["uri-id", "type", "tid", "cid"],
1199 "comment" => "Thread related data",
1201 "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"],
1202 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1203 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1204 "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"],
1205 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1206 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1207 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1208 "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"],
1209 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
1212 "PRIMARY" => ["uri-id"],
1213 "owner-id" => ["owner-id"],
1214 "author-id" => ["author-id"],
1215 "causer-id" => ["causer-id"],
1216 "received" => ["received"],
1217 "commented" => ["commented"],
1221 "comment" => "User specific post data",
1223 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
1224 "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"],
1225 "parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
1226 "thr-parent-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
1227 "external-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the external uri"],
1228 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
1229 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
1230 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
1231 "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1232 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
1233 "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"],
1234 "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"],
1235 "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"],
1236 "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, image, article, ...)"],
1237 "post-reason" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Reason why the post arrived at the user"],
1238 "vid" => ["type" => "smallint unsigned", "foreign" => ["verb" => "id", "on delete" => "restrict"], "comment" => "Id of the verb table entry that contains the activity verbs"],
1239 "private" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "0=public, 1=private, 2=unlisted"],
1240 "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1241 "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1242 "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been marked for deletion"],
1243 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1244 "protocol" => ["type" => "tinyint unsigned", "comment" => "Protocol used to deliver the item for this user"],
1245 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1246 "event-id" => ["type" => "int unsigned", "foreign" => ["event" => "id"], "comment" => "Used to link to the event.id"],
1247 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1248 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1249 "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1250 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1251 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1252 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1255 "PRIMARY" => ["id"],
1256 "uid_uri-id" => ["UNIQUE", "uid", "uri-id"],
1257 "uri-id" => ["uri-id"],
1258 "parent-uri-id" => ["parent-uri-id"],
1259 "thr-parent-id" => ["thr-parent-id"],
1260 "external-id" => ["external-id"],
1261 "owner-id" => ["owner-id"],
1262 "author-id" => ["author-id"],
1263 "causer-id" => ["causer-id"],
1265 "contact-id" => ["contact-id"],
1266 "event-id" => ["event-id"],
1268 "author-id_uid" => ["author-id", "uid"],
1269 "author-id_received" => ["author-id", "received"],
1270 "parent-uri-id_uid" => ["parent-uri-id", "uid"],
1271 "uid_contactid" => ["uid", "contact-id"],
1272 "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
1273 "uid_unseen" => ["uid", "unseen"],
1274 "uid_hidden_uri-id" => ["uid", "hidden", "uri-id"],
1277 "post-thread-user" => [
1278 "comment" => "Thread related data per user",
1280 "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"],
1281 "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item owner"],
1282 "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Item author"],
1283 "causer-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the contact that caused the item creation"],
1284 "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
1285 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1286 "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1287 "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"],
1288 "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1289 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1290 "pinned" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The thread is pinned on the profile page"],
1291 "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1292 "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Ignore updates for this thread"],
1293 "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
1294 "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1295 "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
1296 "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1297 "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id"],
1298 "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "post has not been seen"],
1299 "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide the post from the user"],
1300 "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
1301 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this post"],
1302 "post-user-id" => ["type" => "int unsigned", "foreign" => ["post-user" => "id"], "comment" => "Id of the post-user table"],
1305 "PRIMARY" => ["uid", "uri-id"],
1306 "uri-id" => ["uri-id"],
1307 "owner-id" => ["owner-id"],
1308 "author-id" => ["author-id"],
1309 "causer-id" => ["causer-id"],
1311 "contact-id" => ["contact-id"],
1313 "post-user-id" => ["post-user-id"],
1314 "commented" => ["commented"],
1315 "uid_received" => ["uid", "received"],
1316 "uid_wall_received" => ["uid", "wall", "received"],
1317 "uid_pinned" => ["uid", "pinned"],
1318 "uid_commented" => ["uid", "commented"],
1319 "uid_starred" => ["uid", "starred"],
1320 "uid_mention" => ["uid", "mention"],
1323 "post-user-notification" => [
1324 "comment" => "User post notifications",
1326 "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"],
1327 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
1328 "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1331 "PRIMARY" => ["uid", "uri-id"],
1332 "uri-id" => ["uri-id"],
1336 "comment" => "Currently running system processes",
1338 "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => ""],
1339 "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
1340 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1343 "PRIMARY" => ["pid"],
1344 "command" => ["command"],
1348 "comment" => "user profiles data",
1350 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1351 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
1352 "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1353 "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
1354 "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
1355 "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1356 "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1357 "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
1358 "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1359 "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1360 "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1361 "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
1362 "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1363 "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1364 "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
1365 "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1366 "with" => ["type" => "text", "comment" => "Deprecated"],
1367 "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
1368 "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1369 "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1370 "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1371 "pub_keywords" => ["type" => "text", "comment" => ""],
1372 "prv_keywords" => ["type" => "text", "comment" => ""],
1373 "likes" => ["type" => "text", "comment" => "Deprecated"],
1374 "dislikes" => ["type" => "text", "comment" => "Deprecated"],
1375 "about" => ["type" => "text", "comment" => "Profile description"],
1376 "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
1377 "music" => ["type" => "text", "comment" => "Deprecated"],
1378 "book" => ["type" => "text", "comment" => "Deprecated"],
1379 "tv" => ["type" => "text", "comment" => "Deprecated"],
1380 "film" => ["type" => "text", "comment" => "Deprecated"],
1381 "interest" => ["type" => "text", "comment" => "Deprecated"],
1382 "romance" => ["type" => "text", "comment" => "Deprecated"],
1383 "work" => ["type" => "text", "comment" => "Deprecated"],
1384 "education" => ["type" => "text", "comment" => "Deprecated"],
1385 "contact" => ["type" => "text", "comment" => "Deprecated"],
1386 "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1387 "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1388 "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1389 "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1390 "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
1391 "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
1394 "PRIMARY" => ["id"],
1395 "uid_is-default" => ["uid", "is-default"],
1396 "pub_keywords" => ["FULLTEXT", "pub_keywords"],
1399 "profile_field" => [
1400 "comment" => "Custom profile fields",
1402 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1403 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner user id"],
1404 "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
1405 "psid" => ["type" => "int unsigned", "foreign" => ["permissionset" => "id", "on delete" => "restrict"], "comment" => "ID of the permission set of this profile field - 0 = public"],
1406 "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
1407 "value" => ["type" => "text", "comment" => "Value of the field"],
1408 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
1409 "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
1412 "PRIMARY" => ["id"],
1414 "order" => ["order"],
1418 "push_subscriber" => [
1419 "comment" => "Used for OStatus: Contains feed subscribers",
1421 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1422 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1423 "callback_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1424 "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1425 "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1426 "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
1427 "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
1428 "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
1429 "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
1430 "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1433 "PRIMARY" => ["id"],
1434 "next_try" => ["next_try"],
1439 "comment" => "registrations requiring admin approval",
1441 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1442 "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1443 "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
1444 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1445 "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1446 "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
1447 "note" => ["type" => "text", "comment" => ""],
1450 "PRIMARY" => ["id"],
1457 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1458 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "User id"],
1459 "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
1462 "PRIMARY" => ["id"],
1463 "uid_term" => ["uid", "term(64)"],
1464 "term" => ["term(64)"]
1468 "comment" => "web session storage",
1470 "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1471 "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
1472 "data" => ["type" => "text", "comment" => ""],
1473 "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
1476 "PRIMARY" => ["id"],
1477 "sid" => ["sid(64)"],
1478 "expire" => ["expire"],
1482 "comment" => "Data stored by Database storage backend",
1484 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
1485 "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"]
1492 "comment" => "Deleted usernames",
1494 "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
1495 "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
1498 "PRIMARY" => ["id"],
1499 "username" => ["username(32)"],
1503 "comment" => "User specific public contact data",
1505 "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
1506 "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
1507 "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
1508 "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
1509 "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"]
1512 "PRIMARY" => ["uid", "cid"],
1517 "comment" => "Inter process communication between the frontend and the worker",
1519 "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
1520 "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
1523 "PRIMARY" => ["key"],
1525 "engine" => "MEMORY",