1 -- ------------------------------------------
2 -- Friendica 3.5.2-dev (Asparagus)
3 -- DB_UPDATE_VERSION 1215
4 -- ------------------------------------------
10 CREATE TABLE IF NOT EXISTS `addon` (
11 `id` int(11) NOT NULL auto_increment,
12 `name` varchar(190) NOT NULL DEFAULT '',
13 `version` varchar(255) NOT NULL DEFAULT '',
14 `installed` tinyint(1) NOT NULL DEFAULT 0,
15 `hidden` tinyint(1) NOT NULL DEFAULT 0,
16 `timestamp` bigint(20) NOT NULL DEFAULT 0,
17 `plugin_admin` tinyint(1) NOT NULL DEFAULT 0,
19 UNIQUE INDEX `name` (`name`)
20 ) DEFAULT CHARSET=utf8mb4;
25 CREATE TABLE IF NOT EXISTS `attach` (
26 `id` int(11) NOT NULL auto_increment,
27 `uid` int(11) NOT NULL DEFAULT 0,
28 `hash` varchar(64) NOT NULL DEFAULT '',
29 `filename` varchar(255) NOT NULL DEFAULT '',
30 `filetype` varchar(64) NOT NULL DEFAULT '',
31 `filesize` int(11) NOT NULL DEFAULT 0,
32 `data` longblob NOT NULL,
33 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
34 `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
35 `allow_cid` mediumtext,
36 `allow_gid` mediumtext,
37 `deny_cid` mediumtext,
38 `deny_gid` mediumtext,
40 ) DEFAULT CHARSET=utf8mb4;
45 CREATE TABLE IF NOT EXISTS `auth_codes` (
46 `id` varchar(40) NOT NULL,
47 `client_id` varchar(20) NOT NULL DEFAULT '',
48 `redirect_uri` varchar(200) NOT NULL DEFAULT '',
49 `expires` int(11) NOT NULL DEFAULT 0,
50 `scope` varchar(250) NOT NULL DEFAULT '',
52 ) DEFAULT CHARSET=utf8mb4;
57 CREATE TABLE IF NOT EXISTS `cache` (
58 `k` varbinary(255) NOT NULL,
60 `expire_mode` int(11) NOT NULL DEFAULT 0,
61 `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
63 INDEX `expire_mode_updated` (`expire_mode`,`updated`)
64 ) DEFAULT CHARSET=utf8mb4;
69 CREATE TABLE IF NOT EXISTS `challenge` (
70 `id` int(10) unsigned NOT NULL auto_increment,
71 `challenge` varchar(255) NOT NULL DEFAULT '',
72 `dfrn-id` varchar(255) NOT NULL DEFAULT '',
73 `expire` int(11) NOT NULL DEFAULT 0,
74 `type` varchar(255) NOT NULL DEFAULT '',
75 `last_update` varchar(255) NOT NULL DEFAULT '',
77 ) DEFAULT CHARSET=utf8mb4;
82 CREATE TABLE IF NOT EXISTS `clients` (
83 `client_id` varchar(20) NOT NULL,
84 `pw` varchar(20) NOT NULL DEFAULT '',
85 `redirect_uri` varchar(200) NOT NULL DEFAULT '',
88 `uid` int(11) NOT NULL DEFAULT 0,
89 PRIMARY KEY(`client_id`)
90 ) DEFAULT CHARSET=utf8mb4;
95 CREATE TABLE IF NOT EXISTS `config` (
96 `id` int(10) unsigned NOT NULL auto_increment,
97 `cat` varbinary(255) NOT NULL DEFAULT '',
98 `k` varbinary(255) NOT NULL DEFAULT '',
101 UNIQUE INDEX `cat_k` (`cat`,`k`)
102 ) DEFAULT CHARSET=utf8mb4;
107 CREATE TABLE IF NOT EXISTS `contact` (
108 `id` int(11) NOT NULL auto_increment,
109 `uid` int(11) NOT NULL DEFAULT 0,
110 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
111 `self` tinyint(1) NOT NULL DEFAULT 0,
112 `remote_self` tinyint(1) NOT NULL DEFAULT 0,
113 `rel` tinyint(1) NOT NULL DEFAULT 0,
114 `duplex` tinyint(1) NOT NULL DEFAULT 0,
115 `network` varchar(255) NOT NULL DEFAULT '',
116 `name` varchar(255) NOT NULL DEFAULT '',
117 `nick` varchar(255) NOT NULL DEFAULT '',
118 `location` varchar(255) NOT NULL DEFAULT '',
121 `gender` varchar(32) NOT NULL DEFAULT '',
122 `xmpp` varchar(255) NOT NULL DEFAULT '',
123 `attag` varchar(255) NOT NULL DEFAULT '',
124 `avatar` varchar(255) NOT NULL DEFAULT '',
129 `issued-id` varchar(255) NOT NULL DEFAULT '',
130 `dfrn-id` varchar(255) NOT NULL DEFAULT '',
131 `url` varchar(255) NOT NULL DEFAULT '',
132 `nurl` varchar(255) NOT NULL DEFAULT '',
133 `addr` varchar(255) NOT NULL DEFAULT '',
134 `alias` varchar(255) NOT NULL DEFAULT '',
137 `batch` varchar(255) NOT NULL DEFAULT '',
143 `aes_allow` tinyint(1) NOT NULL DEFAULT 0,
144 `ret-aes` tinyint(1) NOT NULL DEFAULT 0,
145 `usehub` tinyint(1) NOT NULL DEFAULT 0,
146 `subhub` tinyint(1) NOT NULL DEFAULT 0,
147 `hub-verify` varchar(255) NOT NULL DEFAULT '',
148 `last-update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
149 `success_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
150 `failure_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
151 `name-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
152 `uri-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
153 `avatar-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
154 `term-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
155 `last-item` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
156 `priority` tinyint(3) NOT NULL DEFAULT 0,
157 `blocked` tinyint(1) NOT NULL DEFAULT 1,
158 `readonly` tinyint(1) NOT NULL DEFAULT 0,
159 `writable` tinyint(1) NOT NULL DEFAULT 0,
160 `forum` tinyint(1) NOT NULL DEFAULT 0,
161 `prv` tinyint(1) NOT NULL DEFAULT 0,
162 `contact-type` int(11) unsigned NOT NULL DEFAULT 0,
163 `hidden` tinyint(1) NOT NULL DEFAULT 0,
164 `archive` tinyint(1) NOT NULL DEFAULT 0,
165 `pending` tinyint(1) NOT NULL DEFAULT 1,
166 `rating` tinyint(1) NOT NULL DEFAULT 0,
168 `closeness` tinyint(2) NOT NULL DEFAULT 99,
170 `profile-id` int(11) NOT NULL DEFAULT 0,
171 `bdyear` varchar(4) NOT NULL DEFAULT '',
172 `bd` date NOT NULL DEFAULT '0001-01-01',
173 `notify_new_posts` tinyint(1) NOT NULL DEFAULT 0,
174 `fetch_further_information` tinyint(1) NOT NULL DEFAULT 0,
175 `ffi_keyword_blacklist` text,
177 INDEX `uid_name` (`uid`,`name`),
178 INDEX `self_uid` (`self`,`uid`),
179 INDEX `alias_uid` (`alias`(32),`uid`),
180 INDEX `pending_uid` (`pending`,`uid`),
181 INDEX `blocked_uid` (`blocked`,`uid`),
182 INDEX `uid_rel_network_poll` (`uid`,`rel`,`network`,`poll`(64),`archive`),
183 INDEX `uid_network_batch` (`uid`,`network`,`batch`(64)),
184 INDEX `addr_uid` (`addr`(32),`uid`),
185 INDEX `nurl_uid` (`nurl`(32),`uid`),
186 INDEX `nick_uid` (`nick`(32),`uid`),
187 INDEX `dfrn-id` (`dfrn-id`),
188 INDEX `issued-id` (`issued-id`)
189 ) DEFAULT CHARSET=utf8mb4;
194 CREATE TABLE IF NOT EXISTS `conv` (
195 `id` int(10) unsigned NOT NULL auto_increment,
196 `guid` varchar(64) NOT NULL DEFAULT '',
198 `uid` int(11) NOT NULL DEFAULT 0,
199 `creator` varchar(255) NOT NULL DEFAULT '',
200 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
201 `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
205 ) DEFAULT CHARSET=utf8mb4;
210 CREATE TABLE IF NOT EXISTS `event` (
211 `id` int(11) NOT NULL auto_increment,
212 `guid` varchar(255) NOT NULL DEFAULT '',
213 `uid` int(11) NOT NULL DEFAULT 0,
214 `cid` int(11) NOT NULL DEFAULT 0,
215 `uri` varchar(255) NOT NULL DEFAULT '',
216 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
217 `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
218 `start` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
219 `finish` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
223 `type` varchar(255) NOT NULL DEFAULT '',
224 `nofinish` tinyint(1) NOT NULL DEFAULT 0,
225 `adjust` tinyint(1) NOT NULL DEFAULT 1,
226 `ignore` tinyint(1) unsigned NOT NULL DEFAULT 0,
227 `allow_cid` mediumtext,
228 `allow_gid` mediumtext,
229 `deny_cid` mediumtext,
230 `deny_gid` mediumtext,
232 INDEX `uid_start` (`uid`,`start`)
233 ) DEFAULT CHARSET=utf8mb4;
238 CREATE TABLE IF NOT EXISTS `fcontact` (
239 `id` int(10) unsigned NOT NULL auto_increment,
240 `guid` varchar(255) NOT NULL DEFAULT '',
241 `url` varchar(255) NOT NULL DEFAULT '',
242 `name` varchar(255) NOT NULL DEFAULT '',
243 `photo` varchar(255) NOT NULL DEFAULT '',
244 `request` varchar(255) NOT NULL DEFAULT '',
245 `nick` varchar(255) NOT NULL DEFAULT '',
246 `addr` varchar(255) NOT NULL DEFAULT '',
247 `batch` varchar(255) NOT NULL DEFAULT '',
248 `notify` varchar(255) NOT NULL DEFAULT '',
249 `poll` varchar(255) NOT NULL DEFAULT '',
250 `confirm` varchar(255) NOT NULL DEFAULT '',
251 `priority` tinyint(1) NOT NULL DEFAULT 0,
252 `network` varchar(32) NOT NULL DEFAULT '',
253 `alias` varchar(255) NOT NULL DEFAULT '',
255 `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
257 INDEX `addr` (`addr`(32)),
259 ) DEFAULT CHARSET=utf8mb4;
264 CREATE TABLE IF NOT EXISTS `ffinder` (
265 `id` int(10) unsigned NOT NULL auto_increment,
266 `uid` int(10) unsigned NOT NULL DEFAULT 0,
267 `cid` int(10) unsigned NOT NULL DEFAULT 0,
268 `fid` int(10) unsigned NOT NULL DEFAULT 0,
270 ) DEFAULT CHARSET=utf8mb4;
275 CREATE TABLE IF NOT EXISTS `fserver` (
276 `id` int(11) NOT NULL auto_increment,
277 `server` varchar(255) NOT NULL DEFAULT '',
278 `posturl` varchar(255) NOT NULL DEFAULT '',
281 INDEX `server` (`server`(32))
282 ) DEFAULT CHARSET=utf8mb4;
287 CREATE TABLE IF NOT EXISTS `fsuggest` (
288 `id` int(11) NOT NULL auto_increment,
289 `uid` int(11) NOT NULL DEFAULT 0,
290 `cid` int(11) NOT NULL DEFAULT 0,
291 `name` varchar(255) NOT NULL DEFAULT '',
292 `url` varchar(255) NOT NULL DEFAULT '',
293 `request` varchar(255) NOT NULL DEFAULT '',
294 `photo` varchar(255) NOT NULL DEFAULT '',
296 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
298 ) DEFAULT CHARSET=utf8mb4;
303 CREATE TABLE IF NOT EXISTS `gcign` (
304 `id` int(11) NOT NULL auto_increment,
305 `uid` int(11) NOT NULL DEFAULT 0,
306 `gcid` int(11) NOT NULL DEFAULT 0,
309 INDEX `gcid` (`gcid`)
310 ) DEFAULT CHARSET=utf8mb4;
315 CREATE TABLE IF NOT EXISTS `gcontact` (
316 `id` int(10) unsigned NOT NULL auto_increment,
317 `name` varchar(255) NOT NULL DEFAULT '',
318 `nick` varchar(255) NOT NULL DEFAULT '',
319 `url` varchar(255) NOT NULL DEFAULT '',
320 `nurl` varchar(255) NOT NULL DEFAULT '',
321 `photo` varchar(255) NOT NULL DEFAULT '',
322 `connect` varchar(255) NOT NULL DEFAULT '',
323 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
324 `updated` datetime DEFAULT '0001-01-01 00:00:00',
325 `last_contact` datetime DEFAULT '0001-01-01 00:00:00',
326 `last_failure` datetime DEFAULT '0001-01-01 00:00:00',
327 `location` varchar(255) NOT NULL DEFAULT '',
330 `gender` varchar(32) NOT NULL DEFAULT '',
331 `birthday` varchar(32) NOT NULL DEFAULT '0001-01-01',
332 `community` tinyint(1) NOT NULL DEFAULT 0,
333 `contact-type` tinyint(1) NOT NULL DEFAULT -1,
334 `hide` tinyint(1) NOT NULL DEFAULT 0,
335 `nsfw` tinyint(1) NOT NULL DEFAULT 0,
336 `network` varchar(255) NOT NULL DEFAULT '',
337 `addr` varchar(255) NOT NULL DEFAULT '',
339 `alias` varchar(255) NOT NULL DEFAULT '',
340 `generation` tinyint(3) NOT NULL DEFAULT 0,
341 `server_url` varchar(255) NOT NULL DEFAULT '',
343 INDEX `nurl` (`nurl`(64)),
344 INDEX `name` (`name`(64)),
345 INDEX `nick` (`nick`(32)),
346 INDEX `addr` (`addr`(64)),
347 INDEX `hide_network_updated` (`hide`,`network`,`updated`),
348 INDEX `updated` (`updated`)
349 ) DEFAULT CHARSET=utf8mb4;
354 CREATE TABLE IF NOT EXISTS `glink` (
355 `id` int(10) unsigned NOT NULL auto_increment,
356 `cid` int(11) NOT NULL DEFAULT 0,
357 `uid` int(11) NOT NULL DEFAULT 0,
358 `gcid` int(11) NOT NULL DEFAULT 0,
359 `zcid` int(11) NOT NULL DEFAULT 0,
360 `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
362 UNIQUE INDEX `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`),
363 INDEX `gcid` (`gcid`)
364 ) DEFAULT CHARSET=utf8mb4;
369 CREATE TABLE IF NOT EXISTS `group` (
370 `id` int(10) unsigned NOT NULL auto_increment,
371 `uid` int(10) unsigned NOT NULL DEFAULT 0,
372 `visible` tinyint(1) NOT NULL DEFAULT 0,
373 `deleted` tinyint(1) NOT NULL DEFAULT 0,
374 `name` varchar(255) NOT NULL DEFAULT '',
377 ) DEFAULT CHARSET=utf8mb4;
380 -- TABLE group_member
382 CREATE TABLE IF NOT EXISTS `group_member` (
383 `id` int(10) unsigned NOT NULL auto_increment,
384 `uid` int(10) unsigned NOT NULL DEFAULT 0,
385 `gid` int(10) unsigned NOT NULL DEFAULT 0,
386 `contact-id` int(10) unsigned NOT NULL DEFAULT 0,
388 INDEX `contactid` (`contact-id`),
389 INDEX `gid_contactid` (`gid`,`contact-id`),
390 UNIQUE INDEX `uid_gid_contactid` (`uid`,`gid`,`contact-id`)
391 ) DEFAULT CHARSET=utf8mb4;
396 CREATE TABLE IF NOT EXISTS `gserver` (
397 `id` int(10) unsigned NOT NULL auto_increment,
398 `url` varchar(255) NOT NULL DEFAULT '',
399 `nurl` varchar(255) NOT NULL DEFAULT '',
400 `version` varchar(255) NOT NULL DEFAULT '',
401 `site_name` varchar(255) NOT NULL DEFAULT '',
403 `register_policy` tinyint(1) NOT NULL DEFAULT 0,
404 `poco` varchar(255) NOT NULL DEFAULT '',
405 `noscrape` varchar(255) NOT NULL DEFAULT '',
406 `network` varchar(32) NOT NULL DEFAULT '',
407 `platform` varchar(255) NOT NULL DEFAULT '',
408 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
409 `last_poco_query` datetime DEFAULT '0001-01-01 00:00:00',
410 `last_contact` datetime DEFAULT '0001-01-01 00:00:00',
411 `last_failure` datetime DEFAULT '0001-01-01 00:00:00',
413 INDEX `nurl` (`nurl`(32))
414 ) DEFAULT CHARSET=utf8mb4;
419 CREATE TABLE IF NOT EXISTS `hook` (
420 `id` int(11) NOT NULL auto_increment,
421 `hook` varchar(255) NOT NULL DEFAULT '',
422 `file` varchar(255) NOT NULL DEFAULT '',
423 `function` varchar(255) NOT NULL DEFAULT '',
424 `priority` int(11) unsigned NOT NULL DEFAULT 0,
426 UNIQUE INDEX `hook_file_function` (`hook`(50),`file`(80),`function`(60))
427 ) DEFAULT CHARSET=utf8mb4;
432 CREATE TABLE IF NOT EXISTS `intro` (
433 `id` int(10) unsigned NOT NULL auto_increment,
434 `uid` int(10) unsigned NOT NULL DEFAULT 0,
435 `fid` int(11) NOT NULL DEFAULT 0,
436 `contact-id` int(11) NOT NULL DEFAULT 0,
437 `knowyou` tinyint(1) NOT NULL DEFAULT 0,
438 `duplex` tinyint(1) NOT NULL DEFAULT 0,
440 `hash` varchar(255) NOT NULL DEFAULT '',
441 `datetime` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
442 `blocked` tinyint(1) NOT NULL DEFAULT 1,
443 `ignore` tinyint(1) NOT NULL DEFAULT 0,
445 ) DEFAULT CHARSET=utf8mb4;
450 CREATE TABLE IF NOT EXISTS `item` (
451 `id` int(10) unsigned NOT NULL auto_increment,
452 `guid` varchar(255) NOT NULL DEFAULT '',
453 `uri` varchar(255) NOT NULL DEFAULT '',
454 `uid` int(10) unsigned NOT NULL DEFAULT 0,
455 `contact-id` int(11) NOT NULL DEFAULT 0,
456 `gcontact-id` int(11) unsigned NOT NULL DEFAULT 0,
457 `type` varchar(255) NOT NULL DEFAULT '',
458 `wall` tinyint(1) NOT NULL DEFAULT 0,
459 `gravity` tinyint(1) NOT NULL DEFAULT 0,
460 `parent` int(10) unsigned NOT NULL DEFAULT 0,
461 `parent-uri` varchar(255) NOT NULL DEFAULT '',
462 `extid` varchar(255) NOT NULL DEFAULT '',
463 `thr-parent` varchar(255) NOT NULL DEFAULT '',
464 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
465 `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
466 `commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
467 `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
468 `changed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
469 `owner-id` int(11) NOT NULL DEFAULT 0,
470 `owner-name` varchar(255) NOT NULL DEFAULT '',
471 `owner-link` varchar(255) NOT NULL DEFAULT '',
472 `owner-avatar` varchar(255) NOT NULL DEFAULT '',
473 `author-id` int(11) NOT NULL DEFAULT 0,
474 `author-name` varchar(255) NOT NULL DEFAULT '',
475 `author-link` varchar(255) NOT NULL DEFAULT '',
476 `author-avatar` varchar(255) NOT NULL DEFAULT '',
477 `title` varchar(255) NOT NULL DEFAULT '',
479 `app` varchar(255) NOT NULL DEFAULT '',
480 `verb` varchar(255) NOT NULL DEFAULT '',
481 `object-type` varchar(255) NOT NULL DEFAULT '',
483 `target-type` varchar(255) NOT NULL DEFAULT '',
486 `plink` varchar(255) NOT NULL DEFAULT '',
487 `resource-id` varchar(255) NOT NULL DEFAULT '',
488 `event-id` int(11) NOT NULL DEFAULT 0,
493 `location` varchar(255) NOT NULL DEFAULT '',
494 `coord` varchar(255) NOT NULL DEFAULT '',
495 `allow_cid` mediumtext,
496 `allow_gid` mediumtext,
497 `deny_cid` mediumtext,
498 `deny_gid` mediumtext,
499 `private` tinyint(1) NOT NULL DEFAULT 0,
500 `pubmail` tinyint(1) NOT NULL DEFAULT 0,
501 `moderated` tinyint(1) NOT NULL DEFAULT 0,
502 `visible` tinyint(1) NOT NULL DEFAULT 0,
503 `spam` tinyint(1) NOT NULL DEFAULT 0,
504 `starred` tinyint(1) NOT NULL DEFAULT 0,
505 `bookmark` tinyint(1) NOT NULL DEFAULT 0,
506 `unseen` tinyint(1) NOT NULL DEFAULT 1,
507 `deleted` tinyint(1) NOT NULL DEFAULT 0,
508 `origin` tinyint(1) NOT NULL DEFAULT 0,
509 `forum_mode` tinyint(1) NOT NULL DEFAULT 0,
510 `last-child` tinyint(1) unsigned NOT NULL DEFAULT 1,
511 `mention` tinyint(1) NOT NULL DEFAULT 0,
512 `network` varchar(32) NOT NULL DEFAULT '',
513 `rendered-hash` varchar(32) NOT NULL DEFAULT '',
514 `rendered-html` mediumtext,
515 `global` tinyint(1) NOT NULL DEFAULT 0,
517 INDEX `guid` (`guid`),
519 INDEX `parent` (`parent`),
520 INDEX `parent-uri` (`parent-uri`),
521 INDEX `extid` (`extid`),
522 INDEX `uid_id` (`uid`,`id`),
523 INDEX `uid_contactid_id` (`uid`,`contact-id`,`id`),
524 INDEX `uid_created` (`uid`,`created`),
525 INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),
526 INDEX `uid_network_received` (`uid`,`network`,`received`),
527 INDEX `uid_network_commented` (`uid`,`network`,`commented`),
528 INDEX `uid_thrparent` (`uid`,`thr-parent`),
529 INDEX `uid_parenturi` (`uid`,`parent-uri`),
530 INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
531 INDEX `authorid_created` (`author-id`,`created`),
532 INDEX `uid_uri` (`uid`,`uri`),
533 INDEX `resource-id` (`resource-id`),
534 INDEX `contactid_allowcid_allowpid_denycid_denygid` (`contact-id`,`allow_cid`(10),`allow_gid`(10),`deny_cid`(10),`deny_gid`(10)),
535 INDEX `uid_type_changed` (`uid`,`type`,`changed`),
536 INDEX `contactid_verb` (`contact-id`,`verb`),
537 INDEX `deleted_changed` (`deleted`,`changed`),
538 INDEX `uid_wall_changed` (`uid`,`wall`,`changed`),
539 INDEX `uid_eventid` (`uid`,`event-id`),
540 INDEX `uid_authorlink` (`uid`,`author-link`),
541 INDEX `uid_ownerlink` (`uid`,`owner-link`)
542 ) DEFAULT CHARSET=utf8mb4;
547 CREATE TABLE IF NOT EXISTS `item_id` (
548 `id` int(11) NOT NULL auto_increment,
549 `iid` int(11) NOT NULL DEFAULT 0,
550 `uid` int(11) NOT NULL DEFAULT 0,
551 `sid` varchar(255) NOT NULL DEFAULT '',
552 `service` varchar(255) NOT NULL DEFAULT '',
556 INDEX `service` (`service`(32)),
558 ) DEFAULT CHARSET=utf8mb4;
563 CREATE TABLE IF NOT EXISTS `locks` (
564 `id` int(11) NOT NULL auto_increment,
565 `name` varchar(128) NOT NULL DEFAULT '',
566 `locked` tinyint(1) NOT NULL DEFAULT 0,
567 `created` datetime DEFAULT '0001-01-01 00:00:00',
569 ) DEFAULT CHARSET=utf8mb4;
574 CREATE TABLE IF NOT EXISTS `mail` (
575 `id` int(10) unsigned NOT NULL auto_increment,
576 `uid` int(10) unsigned NOT NULL DEFAULT 0,
577 `guid` varchar(64) NOT NULL DEFAULT '',
578 `from-name` varchar(255) NOT NULL DEFAULT '',
579 `from-photo` varchar(255) NOT NULL DEFAULT '',
580 `from-url` varchar(255) NOT NULL DEFAULT '',
581 `contact-id` varchar(255) NOT NULL DEFAULT '',
582 `convid` int(11) unsigned NOT NULL DEFAULT 0,
583 `title` varchar(255) NOT NULL DEFAULT '',
585 `seen` tinyint(1) NOT NULL DEFAULT 0,
586 `reply` tinyint(1) NOT NULL DEFAULT 0,
587 `replied` tinyint(1) NOT NULL DEFAULT 0,
588 `unknown` tinyint(1) NOT NULL DEFAULT 0,
589 `uri` varchar(255) NOT NULL DEFAULT '',
590 `parent-uri` varchar(255) NOT NULL DEFAULT '',
591 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
593 INDEX `uid_seen` (`uid`,`seen`),
594 INDEX `convid` (`convid`),
595 INDEX `uri` (`uri`(64)),
596 INDEX `parent-uri` (`parent-uri`(64))
597 ) DEFAULT CHARSET=utf8mb4;
602 CREATE TABLE IF NOT EXISTS `mailacct` (
603 `id` int(11) NOT NULL auto_increment,
604 `uid` int(11) NOT NULL DEFAULT 0,
605 `server` varchar(255) NOT NULL DEFAULT '',
606 `port` int(11) NOT NULL DEFAULT 0,
607 `ssltype` varchar(16) NOT NULL DEFAULT '',
608 `mailbox` varchar(255) NOT NULL DEFAULT '',
609 `user` varchar(255) NOT NULL DEFAULT '',
611 `reply_to` varchar(255) NOT NULL DEFAULT '',
612 `action` int(11) NOT NULL DEFAULT 0,
613 `movetofolder` varchar(255) NOT NULL DEFAULT '',
614 `pubmail` tinyint(1) NOT NULL DEFAULT 0,
615 `last_check` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
617 ) DEFAULT CHARSET=utf8mb4;
622 CREATE TABLE IF NOT EXISTS `manage` (
623 `id` int(11) NOT NULL auto_increment,
624 `uid` int(11) NOT NULL DEFAULT 0,
625 `mid` int(11) NOT NULL DEFAULT 0,
627 UNIQUE INDEX `uid_mid` (`uid`,`mid`)
628 ) DEFAULT CHARSET=utf8mb4;
633 CREATE TABLE IF NOT EXISTS `notify` (
634 `id` int(11) NOT NULL auto_increment,
635 `hash` varchar(64) NOT NULL DEFAULT '',
636 `type` int(11) NOT NULL DEFAULT 0,
637 `name` varchar(255) NOT NULL DEFAULT '',
638 `url` varchar(255) NOT NULL DEFAULT '',
639 `photo` varchar(255) NOT NULL DEFAULT '',
640 `date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
642 `uid` int(11) NOT NULL DEFAULT 0,
643 `link` varchar(255) NOT NULL DEFAULT '',
644 `iid` int(11) NOT NULL DEFAULT 0,
645 `parent` int(11) NOT NULL DEFAULT 0,
646 `seen` tinyint(1) NOT NULL DEFAULT 0,
647 `verb` varchar(255) NOT NULL DEFAULT '',
648 `otype` varchar(16) NOT NULL DEFAULT '',
649 `name_cache` tinytext,
650 `msg_cache` mediumtext,
652 INDEX `hash_uid` (`hash`,`uid`),
653 INDEX `seen_uid_date` (`seen`,`uid`,`date`),
654 INDEX `uid_date` (`uid`,`date`),
655 INDEX `uid_type_link` (`uid`,`type`,`link`)
656 ) DEFAULT CHARSET=utf8mb4;
659 -- TABLE notify-threads
661 CREATE TABLE IF NOT EXISTS `notify-threads` (
662 `id` int(11) NOT NULL auto_increment,
663 `notify-id` int(11) NOT NULL DEFAULT 0,
664 `master-parent-item` int(10) unsigned NOT NULL DEFAULT 0,
665 `parent-item` int(10) unsigned NOT NULL DEFAULT 0,
666 `receiver-uid` int(11) NOT NULL DEFAULT 0,
668 ) DEFAULT CHARSET=utf8mb4;
673 CREATE TABLE IF NOT EXISTS `oembed` (
674 `url` varbinary(255) NOT NULL,
675 `content` mediumtext,
676 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
678 INDEX `created` (`created`)
679 ) DEFAULT CHARSET=utf8mb4;
684 CREATE TABLE IF NOT EXISTS `parsed_url` (
685 `url` varbinary(255) NOT NULL,
686 `guessing` tinyint(1) NOT NULL DEFAULT 0,
687 `oembed` tinyint(1) NOT NULL DEFAULT 0,
688 `content` mediumtext,
689 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
690 PRIMARY KEY(`url`,`guessing`,`oembed`),
691 INDEX `created` (`created`)
692 ) DEFAULT CHARSET=utf8mb4;
697 CREATE TABLE IF NOT EXISTS `pconfig` (
698 `id` int(11) NOT NULL auto_increment,
699 `uid` int(11) NOT NULL DEFAULT 0,
700 `cat` varbinary(255) NOT NULL DEFAULT '',
701 `k` varbinary(255) NOT NULL DEFAULT '',
704 UNIQUE INDEX `uid_cat_k` (`uid`,`cat`,`k`)
705 ) DEFAULT CHARSET=utf8mb4;
710 CREATE TABLE IF NOT EXISTS `photo` (
711 `id` int(10) unsigned NOT NULL auto_increment,
712 `uid` int(10) unsigned NOT NULL DEFAULT 0,
713 `contact-id` int(10) unsigned NOT NULL DEFAULT 0,
714 `guid` varchar(64) NOT NULL DEFAULT '',
715 `resource-id` varchar(255) NOT NULL DEFAULT '',
716 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
717 `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
718 `title` varchar(255) NOT NULL DEFAULT '',
720 `album` varchar(255) NOT NULL DEFAULT '',
721 `filename` varchar(255) NOT NULL DEFAULT '',
722 `type` varchar(128) NOT NULL DEFAULT 'image/jpeg',
723 `height` smallint(6) NOT NULL DEFAULT 0,
724 `width` smallint(6) NOT NULL DEFAULT 0,
725 `datasize` int(10) unsigned NOT NULL DEFAULT 0,
726 `data` mediumblob NOT NULL,
727 `scale` tinyint(3) NOT NULL DEFAULT 0,
728 `profile` tinyint(1) NOT NULL DEFAULT 0,
729 `allow_cid` mediumtext,
730 `allow_gid` mediumtext,
731 `deny_cid` mediumtext,
732 `deny_gid` mediumtext,
734 INDEX `uid_contactid` (`uid`,`contact-id`),
735 INDEX `uid_profile` (`uid`,`profile`),
736 INDEX `uid_album_scale_created` (`uid`,`album`(32),`scale`,`created`),
737 INDEX `uid_album_resource-id_created` (`uid`,`album`(32),`resource-id`(64),`created`),
738 INDEX `resource-id` (`resource-id`(64))
739 ) DEFAULT CHARSET=utf8mb4;
744 CREATE TABLE IF NOT EXISTS `poll` (
745 `id` int(11) NOT NULL auto_increment,
746 `uid` int(11) NOT NULL DEFAULT 0,
759 ) DEFAULT CHARSET=utf8mb4;
764 CREATE TABLE IF NOT EXISTS `poll_result` (
765 `id` int(11) NOT NULL auto_increment,
766 `poll_id` int(11) NOT NULL DEFAULT 0,
767 `choice` int(11) NOT NULL DEFAULT 0,
769 INDEX `poll_id` (`poll_id`),
770 INDEX `choice` (`choice`)
771 ) DEFAULT CHARSET=utf8mb4;
776 CREATE TABLE IF NOT EXISTS `process` (
777 `pid` int(10) unsigned NOT NULL,
778 `command` varbinary(32) NOT NULL DEFAULT '',
779 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
781 INDEX `command` (`command`)
782 ) DEFAULT CHARSET=utf8mb4;
787 CREATE TABLE IF NOT EXISTS `profile` (
788 `id` int(11) NOT NULL auto_increment,
789 `uid` int(11) NOT NULL DEFAULT 0,
790 `profile-name` varchar(255) NOT NULL DEFAULT '',
791 `is-default` tinyint(1) NOT NULL DEFAULT 0,
792 `hide-friends` tinyint(1) NOT NULL DEFAULT 0,
793 `name` varchar(255) NOT NULL DEFAULT '',
794 `pdesc` varchar(255) NOT NULL DEFAULT '',
795 `dob` varchar(32) NOT NULL DEFAULT '0001-01-01',
796 `address` varchar(255) NOT NULL DEFAULT '',
797 `locality` varchar(255) NOT NULL DEFAULT '',
798 `region` varchar(255) NOT NULL DEFAULT '',
799 `postal-code` varchar(32) NOT NULL DEFAULT '',
800 `country-name` varchar(255) NOT NULL DEFAULT '',
801 `hometown` varchar(255) NOT NULL DEFAULT '',
802 `gender` varchar(32) NOT NULL DEFAULT '',
803 `marital` varchar(255) NOT NULL DEFAULT '',
805 `howlong` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
806 `sexual` varchar(255) NOT NULL DEFAULT '',
807 `politic` varchar(255) NOT NULL DEFAULT '',
808 `religion` varchar(255) NOT NULL DEFAULT '',
814 `summary` varchar(255) NOT NULL DEFAULT '',
824 `homepage` varchar(255) NOT NULL DEFAULT '',
825 `xmpp` varchar(255) NOT NULL DEFAULT '',
826 `photo` varchar(255) NOT NULL DEFAULT '',
827 `thumb` varchar(255) NOT NULL DEFAULT '',
828 `publish` tinyint(1) NOT NULL DEFAULT 0,
829 `net-publish` tinyint(1) NOT NULL DEFAULT 0,
831 INDEX `uid_is-default` (`uid`,`is-default`)
832 ) DEFAULT CHARSET=utf8mb4;
835 -- TABLE profile_check
837 CREATE TABLE IF NOT EXISTS `profile_check` (
838 `id` int(10) unsigned NOT NULL auto_increment,
839 `uid` int(10) unsigned NOT NULL DEFAULT 0,
840 `cid` int(10) unsigned NOT NULL DEFAULT 0,
841 `dfrn_id` varchar(255) NOT NULL DEFAULT '',
842 `sec` varchar(255) NOT NULL DEFAULT '',
843 `expire` int(11) NOT NULL DEFAULT 0,
845 ) DEFAULT CHARSET=utf8mb4;
848 -- TABLE push_subscriber
850 CREATE TABLE IF NOT EXISTS `push_subscriber` (
851 `id` int(11) NOT NULL auto_increment,
852 `uid` int(11) NOT NULL DEFAULT 0,
853 `callback_url` varchar(255) NOT NULL DEFAULT '',
854 `topic` varchar(255) NOT NULL DEFAULT '',
855 `nickname` varchar(255) NOT NULL DEFAULT '',
856 `push` int(11) NOT NULL DEFAULT 0,
857 `last_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
858 `secret` varchar(255) NOT NULL DEFAULT '',
860 ) DEFAULT CHARSET=utf8mb4;
865 CREATE TABLE IF NOT EXISTS `queue` (
866 `id` int(11) NOT NULL auto_increment,
867 `cid` int(11) NOT NULL DEFAULT 0,
868 `network` varchar(32) NOT NULL DEFAULT '',
869 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
870 `last` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
871 `content` mediumtext,
872 `batch` tinyint(1) NOT NULL DEFAULT 0,
875 INDEX `created` (`created`),
876 INDEX `last` (`last`),
877 INDEX `network` (`network`),
878 INDEX `batch` (`batch`)
879 ) DEFAULT CHARSET=utf8mb4;
884 CREATE TABLE IF NOT EXISTS `register` (
885 `id` int(11) unsigned NOT NULL auto_increment,
886 `hash` varchar(255) NOT NULL DEFAULT '',
887 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
888 `uid` int(11) unsigned NOT NULL DEFAULT 0,
889 `password` varchar(255) NOT NULL DEFAULT '',
890 `language` varchar(16) NOT NULL DEFAULT '',
893 ) DEFAULT CHARSET=utf8mb4;
898 CREATE TABLE IF NOT EXISTS `search` (
899 `id` int(11) NOT NULL auto_increment,
900 `uid` int(11) NOT NULL DEFAULT 0,
901 `term` varchar(255) NOT NULL DEFAULT '',
904 ) DEFAULT CHARSET=utf8mb4;
909 CREATE TABLE IF NOT EXISTS `session` (
910 `id` bigint(20) unsigned NOT NULL auto_increment,
911 `sid` varbinary(255) NOT NULL DEFAULT '',
913 `expire` int(10) unsigned NOT NULL DEFAULT 0,
915 INDEX `sid` (`sid`(64)),
916 INDEX `expire` (`expire`)
917 ) DEFAULT CHARSET=utf8mb4;
922 CREATE TABLE IF NOT EXISTS `sign` (
923 `id` int(10) unsigned NOT NULL auto_increment,
924 `iid` int(10) unsigned NOT NULL DEFAULT 0,
925 `signed_text` mediumtext,
927 `signer` varchar(255) NOT NULL DEFAULT '',
930 ) DEFAULT CHARSET=utf8mb4;
935 CREATE TABLE IF NOT EXISTS `spam` (
936 `id` int(11) NOT NULL auto_increment,
937 `uid` int(11) NOT NULL DEFAULT 0,
938 `spam` int(11) NOT NULL DEFAULT 0,
939 `ham` int(11) NOT NULL DEFAULT 0,
940 `term` varchar(255) NOT NULL DEFAULT '',
941 `date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
944 INDEX `spam` (`spam`),
946 INDEX `term` (`term`)
947 ) DEFAULT CHARSET=utf8mb4;
952 CREATE TABLE IF NOT EXISTS `term` (
953 `tid` int(10) unsigned NOT NULL auto_increment,
954 `oid` int(10) unsigned NOT NULL DEFAULT 0,
955 `otype` tinyint(3) unsigned NOT NULL DEFAULT 0,
956 `type` tinyint(3) unsigned NOT NULL DEFAULT 0,
957 `term` varchar(255) NOT NULL DEFAULT '',
958 `url` varchar(255) NOT NULL DEFAULT '',
959 `guid` varchar(255) NOT NULL DEFAULT '',
960 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
961 `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
962 `global` tinyint(1) NOT NULL DEFAULT 0,
963 `aid` int(10) unsigned NOT NULL DEFAULT 0,
964 `uid` int(10) unsigned NOT NULL DEFAULT 0,
966 INDEX `oid_otype_type_term` (`oid`,`otype`,`type`,`term`),
967 INDEX `uid_otype_type_term_global_created` (`uid`,`otype`,`type`,`term`(32),`global`,`created`),
968 INDEX `uid_otype_type_url` (`uid`,`otype`,`type`,`url`(64)),
969 INDEX `guid` (`guid`(64))
970 ) DEFAULT CHARSET=utf8mb4;
975 CREATE TABLE IF NOT EXISTS `thread` (
976 `iid` int(10) unsigned NOT NULL DEFAULT 0,
977 `uid` int(10) unsigned NOT NULL DEFAULT 0,
978 `contact-id` int(11) unsigned NOT NULL DEFAULT 0,
979 `gcontact-id` int(11) unsigned NOT NULL DEFAULT 0,
980 `owner-id` int(11) unsigned NOT NULL DEFAULT 0,
981 `author-id` int(11) unsigned NOT NULL DEFAULT 0,
982 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
983 `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
984 `commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
985 `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
986 `changed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
987 `wall` tinyint(1) NOT NULL DEFAULT 0,
988 `private` tinyint(1) NOT NULL DEFAULT 0,
989 `pubmail` tinyint(1) NOT NULL DEFAULT 0,
990 `moderated` tinyint(1) NOT NULL DEFAULT 0,
991 `visible` tinyint(1) NOT NULL DEFAULT 0,
992 `spam` tinyint(1) NOT NULL DEFAULT 0,
993 `starred` tinyint(1) NOT NULL DEFAULT 0,
994 `ignored` tinyint(1) NOT NULL DEFAULT 0,
995 `bookmark` tinyint(1) NOT NULL DEFAULT 0,
996 `unseen` tinyint(1) NOT NULL DEFAULT 1,
997 `deleted` tinyint(1) NOT NULL DEFAULT 0,
998 `origin` tinyint(1) NOT NULL DEFAULT 0,
999 `forum_mode` tinyint(1) NOT NULL DEFAULT 0,
1000 `mention` tinyint(1) NOT NULL DEFAULT 0,
1001 `network` varchar(32) NOT NULL DEFAULT '',
1003 INDEX `uid_network_commented` (`uid`,`network`,`commented`),
1004 INDEX `uid_network_created` (`uid`,`network`,`created`),
1005 INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`),
1006 INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
1007 INDEX `uid_created` (`uid`,`created`),
1008 INDEX `uid_commented` (`uid`,`commented`),
1009 INDEX `uid_wall_created` (`uid`,`wall`,`created`)
1010 ) DEFAULT CHARSET=utf8mb4;
1015 CREATE TABLE IF NOT EXISTS `tokens` (
1016 `id` varchar(40) NOT NULL,
1018 `client_id` varchar(20) NOT NULL DEFAULT '',
1019 `expires` int(11) NOT NULL DEFAULT 0,
1020 `scope` varchar(200) NOT NULL DEFAULT '',
1021 `uid` int(11) NOT NULL DEFAULT 0,
1023 ) DEFAULT CHARSET=utf8mb4;
1028 CREATE TABLE IF NOT EXISTS `user` (
1029 `uid` int(11) NOT NULL auto_increment,
1030 `guid` varchar(64) NOT NULL DEFAULT '',
1031 `username` varchar(255) NOT NULL DEFAULT '',
1032 `password` varchar(255) NOT NULL DEFAULT '',
1033 `nickname` varchar(255) NOT NULL DEFAULT '',
1034 `email` varchar(255) NOT NULL DEFAULT '',
1035 `openid` varchar(255) NOT NULL DEFAULT '',
1036 `timezone` varchar(128) NOT NULL DEFAULT '',
1037 `language` varchar(32) NOT NULL DEFAULT 'en',
1038 `register_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
1039 `login_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
1040 `default-location` varchar(255) NOT NULL DEFAULT '',
1041 `allow_location` tinyint(1) NOT NULL DEFAULT 0,
1042 `theme` varchar(255) NOT NULL DEFAULT '',
1047 `verified` tinyint(1) unsigned NOT NULL DEFAULT 0,
1048 `blocked` tinyint(1) unsigned NOT NULL DEFAULT 0,
1049 `blockwall` tinyint(1) unsigned NOT NULL DEFAULT 0,
1050 `hidewall` tinyint(1) unsigned NOT NULL DEFAULT 0,
1051 `blocktags` tinyint(1) unsigned NOT NULL DEFAULT 0,
1052 `unkmail` tinyint(1) NOT NULL DEFAULT 0,
1053 `cntunkmail` int(11) NOT NULL DEFAULT 10,
1054 `notify-flags` int(11) unsigned NOT NULL DEFAULT 65535,
1055 `page-flags` int(11) unsigned NOT NULL DEFAULT 0,
1056 `account-type` int(11) unsigned NOT NULL DEFAULT 0,
1057 `prvnets` tinyint(1) NOT NULL DEFAULT 0,
1058 `pwdreset` varchar(255) NOT NULL DEFAULT '',
1059 `maxreq` int(11) NOT NULL DEFAULT 10,
1060 `expire` int(11) unsigned NOT NULL DEFAULT 0,
1061 `account_removed` tinyint(1) NOT NULL DEFAULT 0,
1062 `account_expired` tinyint(1) NOT NULL DEFAULT 0,
1063 `account_expires_on` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
1064 `expire_notification_sent` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
1065 `service_class` varchar(32) NOT NULL DEFAULT '',
1066 `def_gid` int(11) NOT NULL DEFAULT 0,
1067 `allow_cid` mediumtext,
1068 `allow_gid` mediumtext,
1069 `deny_cid` mediumtext,
1070 `deny_gid` mediumtext,
1071 `openidserver` text,
1073 INDEX `nickname` (`nickname`(32))
1074 ) DEFAULT CHARSET=utf8mb4;
1079 CREATE TABLE IF NOT EXISTS `userd` (
1080 `id` int(11) NOT NULL auto_increment,
1081 `username` varchar(255) NOT NULL,
1083 INDEX `username` (`username`(32))
1084 ) DEFAULT CHARSET=utf8mb4;
1087 -- TABLE workerqueue
1089 CREATE TABLE IF NOT EXISTS `workerqueue` (
1090 `id` int(11) NOT NULL auto_increment,
1092 `priority` tinyint(3) unsigned NOT NULL DEFAULT 0,
1093 `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
1094 `pid` int(11) NOT NULL DEFAULT 0,
1095 `executed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
1097 ) DEFAULT CHARSET=utf8mb4;