1 -- ------------------------------------------
2 -- Friendica 3.5-dev (Asparagus)
3 -- DB_UPDATE_VERSION 1195
4 -- ------------------------------------------
10 CREATE TABLE IF NOT EXISTS `addon` (
11 `id` int(11) NOT NULL auto_increment,
12 `name` varchar(255) 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 ) DEFAULT CHARSET=utf8;
24 CREATE TABLE IF NOT EXISTS `attach` (
25 `id` int(11) NOT NULL auto_increment,
26 `uid` int(11) NOT NULL DEFAULT 0,
27 `hash` varchar(64) NOT NULL DEFAULT '',
28 `filename` varchar(255) NOT NULL DEFAULT '',
29 `filetype` varchar(64) NOT NULL DEFAULT '',
30 `filesize` int(11) NOT NULL DEFAULT 0,
31 `data` longblob NOT NULL,
32 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
33 `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
34 `allow_cid` mediumtext NOT NULL,
35 `allow_gid` mediumtext NOT NULL,
36 `deny_cid` mediumtext NOT NULL,
37 `deny_gid` mediumtext NOT NULL,
39 ) DEFAULT CHARSET=utf8;
44 CREATE TABLE IF NOT EXISTS `auth_codes` (
45 `id` varchar(40) NOT NULL,
46 `client_id` varchar(20) NOT NULL DEFAULT '',
47 `redirect_uri` varchar(200) NOT NULL DEFAULT '',
48 `expires` int(11) NOT NULL DEFAULT 0,
49 `scope` varchar(250) NOT NULL DEFAULT '',
51 ) DEFAULT CHARSET=utf8;
56 CREATE TABLE IF NOT EXISTS `cache` (
57 `k` varchar(255) NOT NULL,
59 `expire_mode` int(11) NOT NULL DEFAULT 0,
60 `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
62 INDEX `updated` (`updated`)
63 ) DEFAULT CHARSET=utf8;
68 CREATE TABLE IF NOT EXISTS `challenge` (
69 `id` int(10) unsigned NOT NULL auto_increment,
70 `challenge` varchar(255) NOT NULL DEFAULT '',
71 `dfrn-id` varchar(255) NOT NULL DEFAULT '',
72 `expire` int(11) NOT NULL DEFAULT 0,
73 `type` varchar(255) NOT NULL DEFAULT '',
74 `last_update` varchar(255) NOT NULL DEFAULT '',
76 ) DEFAULT CHARSET=utf8;
81 CREATE TABLE IF NOT EXISTS `clients` (
82 `client_id` varchar(20) NOT NULL,
83 `pw` varchar(20) NOT NULL DEFAULT '',
84 `redirect_uri` varchar(200) NOT NULL DEFAULT '',
87 `uid` int(11) NOT NULL DEFAULT 0,
88 PRIMARY KEY(`client_id`)
89 ) DEFAULT CHARSET=utf8;
94 CREATE TABLE IF NOT EXISTS `config` (
95 `id` int(10) unsigned NOT NULL auto_increment,
96 `cat` varchar(255) NOT NULL DEFAULT '',
97 `k` varchar(255) NOT NULL DEFAULT '',
100 INDEX `cat_k` (`cat`(30),`k`(30))
101 ) DEFAULT CHARSET=utf8;
106 CREATE TABLE IF NOT EXISTS `contact` (
107 `id` int(11) NOT NULL auto_increment,
108 `uid` int(11) NOT NULL DEFAULT 0,
109 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
110 `self` tinyint(1) NOT NULL DEFAULT 0,
111 `remote_self` tinyint(1) NOT NULL DEFAULT 0,
112 `rel` tinyint(1) NOT NULL DEFAULT 0,
113 `duplex` tinyint(1) NOT NULL DEFAULT 0,
114 `network` varchar(255) NOT NULL DEFAULT '',
115 `name` varchar(255) NOT NULL DEFAULT '',
116 `nick` varchar(255) NOT NULL DEFAULT '',
117 `location` varchar(255) NOT NULL DEFAULT '',
118 `about` text NOT NULL,
119 `keywords` text NOT NULL,
120 `gender` varchar(32) NOT NULL DEFAULT '',
121 `attag` varchar(255) NOT NULL DEFAULT '',
122 `avatar` varchar(255) NOT NULL DEFAULT '',
123 `photo` text NOT NULL,
124 `thumb` text NOT NULL,
125 `micro` text NOT NULL,
126 `site-pubkey` text NOT NULL,
127 `issued-id` varchar(255) NOT NULL DEFAULT '',
128 `dfrn-id` varchar(255) NOT NULL DEFAULT '',
129 `url` varchar(255) NOT NULL DEFAULT '',
130 `nurl` varchar(255) NOT NULL DEFAULT '',
131 `addr` varchar(255) NOT NULL DEFAULT '',
132 `alias` varchar(255) NOT NULL DEFAULT '',
133 `pubkey` text NOT NULL,
134 `prvkey` text NOT NULL,
135 `batch` varchar(255) NOT NULL DEFAULT '',
136 `request` text NOT NULL,
137 `notify` text NOT NULL,
138 `poll` text NOT NULL,
139 `confirm` text NOT NULL,
140 `poco` text NOT NULL,
141 `aes_allow` tinyint(1) NOT NULL DEFAULT 0,
142 `ret-aes` tinyint(1) NOT NULL DEFAULT 0,
143 `usehub` tinyint(1) NOT NULL DEFAULT 0,
144 `subhub` tinyint(1) NOT NULL DEFAULT 0,
145 `hub-verify` varchar(255) NOT NULL DEFAULT '',
146 `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
147 `success_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
148 `failure_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
149 `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
150 `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
151 `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
152 `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
153 `last-item` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
154 `priority` tinyint(3) NOT NULL DEFAULT 0,
155 `blocked` tinyint(1) NOT NULL DEFAULT 1,
156 `readonly` tinyint(1) NOT NULL DEFAULT 0,
157 `writable` tinyint(1) NOT NULL DEFAULT 0,
158 `forum` tinyint(1) NOT NULL DEFAULT 0,
159 `prv` tinyint(1) NOT NULL DEFAULT 0,
160 `hidden` tinyint(1) NOT NULL DEFAULT 0,
161 `archive` tinyint(1) NOT NULL DEFAULT 0,
162 `pending` tinyint(1) NOT NULL DEFAULT 1,
163 `rating` tinyint(1) NOT NULL DEFAULT 0,
164 `reason` text NOT NULL,
165 `closeness` tinyint(2) NOT NULL DEFAULT 99,
166 `info` mediumtext NOT NULL,
167 `profile-id` int(11) NOT NULL DEFAULT 0,
168 `bdyear` varchar(4) NOT NULL DEFAULT '',
169 `bd` date NOT NULL DEFAULT '0000-00-00',
170 `notify_new_posts` tinyint(1) NOT NULL DEFAULT 0,
171 `fetch_further_information` tinyint(1) NOT NULL DEFAULT 0,
172 `ffi_keyword_blacklist` mediumtext NOT NULL,
175 INDEX `nurl` (`nurl`)
176 ) DEFAULT CHARSET=utf8;
181 CREATE TABLE IF NOT EXISTS `conv` (
182 `id` int(10) unsigned NOT NULL auto_increment,
183 `guid` varchar(64) NOT NULL DEFAULT '',
184 `recips` mediumtext NOT NULL,
185 `uid` int(11) NOT NULL DEFAULT 0,
186 `creator` varchar(255) NOT NULL DEFAULT '',
187 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
188 `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
189 `subject` mediumtext NOT NULL,
192 ) DEFAULT CHARSET=utf8;
197 CREATE TABLE IF NOT EXISTS `deliverq` (
198 `id` int(10) unsigned NOT NULL auto_increment,
199 `cmd` varchar(32) NOT NULL DEFAULT '',
200 `item` int(11) NOT NULL DEFAULT 0,
201 `contact` int(11) NOT NULL DEFAULT 0,
203 ) DEFAULT CHARSET=utf8;
208 CREATE TABLE IF NOT EXISTS `event` (
209 `id` int(11) NOT NULL auto_increment,
210 `uid` int(11) NOT NULL DEFAULT 0,
211 `cid` int(11) NOT NULL DEFAULT 0,
212 `uri` varchar(255) NOT NULL DEFAULT '',
213 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
214 `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
215 `start` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
216 `finish` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
217 `summary` text NOT NULL,
218 `desc` text NOT NULL,
219 `location` text NOT NULL,
220 `type` varchar(255) NOT NULL DEFAULT '',
221 `nofinish` tinyint(1) NOT NULL DEFAULT 0,
222 `adjust` tinyint(1) NOT NULL DEFAULT 1,
223 `ignore` tinyint(1) unsigned NOT NULL DEFAULT 0,
224 `allow_cid` mediumtext NOT NULL,
225 `allow_gid` mediumtext NOT NULL,
226 `deny_cid` mediumtext NOT NULL,
227 `deny_gid` mediumtext NOT NULL,
230 ) DEFAULT CHARSET=utf8;
235 CREATE TABLE IF NOT EXISTS `fcontact` (
236 `id` int(10) unsigned NOT NULL auto_increment,
237 `url` varchar(255) NOT NULL DEFAULT '',
238 `name` varchar(255) NOT NULL DEFAULT '',
239 `photo` varchar(255) NOT NULL DEFAULT '',
240 `request` varchar(255) NOT NULL DEFAULT '',
241 `nick` varchar(255) NOT NULL DEFAULT '',
242 `addr` varchar(255) NOT NULL DEFAULT '',
243 `batch` varchar(255) NOT NULL DEFAULT '',
244 `notify` varchar(255) NOT NULL DEFAULT '',
245 `poll` varchar(255) NOT NULL DEFAULT '',
246 `confirm` varchar(255) NOT NULL DEFAULT '',
247 `priority` tinyint(1) NOT NULL DEFAULT 0,
248 `network` varchar(32) NOT NULL DEFAULT '',
249 `alias` varchar(255) NOT NULL DEFAULT '',
250 `pubkey` text NOT NULL,
251 `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
253 INDEX `addr` (`addr`)
254 ) DEFAULT CHARSET=utf8;
259 CREATE TABLE IF NOT EXISTS `ffinder` (
260 `id` int(10) unsigned NOT NULL auto_increment,
261 `uid` int(10) unsigned NOT NULL DEFAULT 0,
262 `cid` int(10) unsigned NOT NULL DEFAULT 0,
263 `fid` int(10) unsigned NOT NULL DEFAULT 0,
265 ) DEFAULT CHARSET=utf8;
270 CREATE TABLE IF NOT EXISTS `fserver` (
271 `id` int(11) NOT NULL auto_increment,
272 `server` varchar(255) NOT NULL DEFAULT '',
273 `posturl` varchar(255) NOT NULL DEFAULT '',
276 INDEX `server` (`server`)
277 ) DEFAULT CHARSET=utf8;
282 CREATE TABLE IF NOT EXISTS `fsuggest` (
283 `id` int(11) NOT NULL auto_increment,
284 `uid` int(11) NOT NULL DEFAULT 0,
285 `cid` int(11) NOT NULL DEFAULT 0,
286 `name` varchar(255) NOT NULL DEFAULT '',
287 `url` varchar(255) NOT NULL DEFAULT '',
288 `request` varchar(255) NOT NULL DEFAULT '',
289 `photo` varchar(255) NOT NULL DEFAULT '',
290 `note` text NOT NULL,
291 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
293 ) DEFAULT CHARSET=utf8;
298 CREATE TABLE IF NOT EXISTS `gcign` (
299 `id` int(11) NOT NULL auto_increment,
300 `uid` int(11) NOT NULL DEFAULT 0,
301 `gcid` int(11) NOT NULL DEFAULT 0,
304 INDEX `gcid` (`gcid`)
305 ) DEFAULT CHARSET=utf8;
310 CREATE TABLE IF NOT EXISTS `gcontact` (
311 `id` int(10) unsigned NOT NULL auto_increment,
312 `name` varchar(255) NOT NULL DEFAULT '',
313 `nick` varchar(255) NOT NULL DEFAULT '',
314 `url` varchar(255) NOT NULL DEFAULT '',
315 `nurl` varchar(255) NOT NULL DEFAULT '',
316 `photo` varchar(255) NOT NULL DEFAULT '',
317 `connect` varchar(255) NOT NULL DEFAULT '',
318 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
319 `updated` datetime DEFAULT '0000-00-00 00:00:00',
320 `last_contact` datetime DEFAULT '0000-00-00 00:00:00',
321 `last_failure` datetime DEFAULT '0000-00-00 00:00:00',
322 `location` varchar(255) NOT NULL DEFAULT '',
323 `about` text NOT NULL,
324 `keywords` text NOT NULL,
325 `gender` varchar(32) NOT NULL DEFAULT '',
326 `birthday` varchar(32) NOT NULL DEFAULT '0000-00-00',
327 `community` tinyint(1) NOT NULL DEFAULT 0,
328 `hide` tinyint(1) NOT NULL DEFAULT 0,
329 `nsfw` tinyint(1) NOT NULL DEFAULT 0,
330 `network` varchar(255) NOT NULL DEFAULT '',
331 `addr` varchar(255) NOT NULL DEFAULT '',
332 `notify` text NOT NULL,
333 `alias` varchar(255) NOT NULL DEFAULT '',
334 `generation` tinyint(3) NOT NULL DEFAULT 0,
335 `server_url` varchar(255) NOT NULL DEFAULT '',
337 INDEX `nurl` (`nurl`),
338 INDEX `name` (`name`),
339 INDEX `nick` (`nick`),
340 INDEX `addr` (`addr`),
341 INDEX `updated` (`updated`)
342 ) DEFAULT CHARSET=utf8;
347 CREATE TABLE IF NOT EXISTS `glink` (
348 `id` int(10) unsigned NOT NULL auto_increment,
349 `cid` int(11) NOT NULL DEFAULT 0,
350 `uid` int(11) NOT NULL DEFAULT 0,
351 `gcid` int(11) NOT NULL DEFAULT 0,
352 `zcid` int(11) NOT NULL DEFAULT 0,
353 `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
355 INDEX `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`),
356 INDEX `gcid` (`gcid`),
357 INDEX `zcid` (`zcid`)
358 ) DEFAULT CHARSET=utf8;
363 CREATE TABLE IF NOT EXISTS `group` (
364 `id` int(10) unsigned NOT NULL auto_increment,
365 `uid` int(10) unsigned NOT NULL DEFAULT 0,
366 `visible` tinyint(1) NOT NULL DEFAULT 0,
367 `deleted` tinyint(1) NOT NULL DEFAULT 0,
368 `name` varchar(255) NOT NULL DEFAULT '',
371 ) DEFAULT CHARSET=utf8;
374 -- TABLE group_member
376 CREATE TABLE IF NOT EXISTS `group_member` (
377 `id` int(10) unsigned NOT NULL auto_increment,
378 `uid` int(10) unsigned NOT NULL DEFAULT 0,
379 `gid` int(10) unsigned NOT NULL DEFAULT 0,
380 `contact-id` int(10) unsigned NOT NULL DEFAULT 0,
382 INDEX `uid_gid_contactid` (`uid`,`gid`,`contact-id`)
383 ) DEFAULT CHARSET=utf8;
388 CREATE TABLE IF NOT EXISTS `gserver` (
389 `id` int(10) unsigned NOT NULL auto_increment,
390 `url` varchar(255) NOT NULL DEFAULT '',
391 `nurl` varchar(255) NOT NULL DEFAULT '',
392 `version` varchar(255) NOT NULL DEFAULT '',
393 `site_name` varchar(255) NOT NULL DEFAULT '',
394 `info` text NOT NULL,
395 `register_policy` tinyint(1) NOT NULL DEFAULT 0,
396 `poco` varchar(255) NOT NULL DEFAULT '',
397 `noscrape` varchar(255) NOT NULL DEFAULT '',
398 `network` varchar(32) NOT NULL DEFAULT '',
399 `platform` varchar(255) NOT NULL DEFAULT '',
400 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
401 `last_poco_query` datetime DEFAULT '0000-00-00 00:00:00',
402 `last_contact` datetime DEFAULT '0000-00-00 00:00:00',
403 `last_failure` datetime DEFAULT '0000-00-00 00:00:00',
405 INDEX `nurl` (`nurl`)
406 ) DEFAULT CHARSET=utf8;
411 CREATE TABLE IF NOT EXISTS `hook` (
412 `id` int(11) NOT NULL auto_increment,
413 `hook` varchar(255) NOT NULL DEFAULT '',
414 `file` varchar(255) NOT NULL DEFAULT '',
415 `function` varchar(255) NOT NULL DEFAULT '',
416 `priority` int(11) unsigned NOT NULL DEFAULT 0,
418 INDEX `hook_file_function` (`hook`(30),`file`(60),`function`(30))
419 ) DEFAULT CHARSET=utf8;
424 CREATE TABLE IF NOT EXISTS `intro` (
425 `id` int(10) unsigned NOT NULL auto_increment,
426 `uid` int(10) unsigned NOT NULL DEFAULT 0,
427 `fid` int(11) NOT NULL DEFAULT 0,
428 `contact-id` int(11) NOT NULL DEFAULT 0,
429 `knowyou` tinyint(1) NOT NULL DEFAULT 0,
430 `duplex` tinyint(1) NOT NULL DEFAULT 0,
431 `note` text NOT NULL,
432 `hash` varchar(255) NOT NULL DEFAULT '',
433 `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
434 `blocked` tinyint(1) NOT NULL DEFAULT 1,
435 `ignore` tinyint(1) NOT NULL DEFAULT 0,
437 ) DEFAULT CHARSET=utf8;
442 CREATE TABLE IF NOT EXISTS `item` (
443 `id` int(10) unsigned NOT NULL auto_increment,
444 `guid` varchar(255) NOT NULL DEFAULT '',
445 `uri` varchar(255) NOT NULL DEFAULT '',
446 `uid` int(10) unsigned NOT NULL DEFAULT 0,
447 `contact-id` int(11) NOT NULL DEFAULT 0,
448 `gcontact-id` int(11) unsigned NOT NULL DEFAULT 0,
449 `type` varchar(255) NOT NULL DEFAULT '',
450 `wall` tinyint(1) NOT NULL DEFAULT 0,
451 `gravity` tinyint(1) NOT NULL DEFAULT 0,
452 `parent` int(10) unsigned NOT NULL DEFAULT 0,
453 `parent-uri` varchar(255) NOT NULL DEFAULT '',
454 `extid` varchar(255) NOT NULL DEFAULT '',
455 `thr-parent` varchar(255) NOT NULL DEFAULT '',
456 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
457 `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
458 `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
459 `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
460 `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
461 `owner-name` varchar(255) NOT NULL DEFAULT '',
462 `owner-link` varchar(255) NOT NULL DEFAULT '',
463 `owner-avatar` varchar(255) NOT NULL DEFAULT '',
464 `author-name` varchar(255) NOT NULL DEFAULT '',
465 `author-link` varchar(255) NOT NULL DEFAULT '',
466 `author-avatar` varchar(255) NOT NULL DEFAULT '',
467 `title` varchar(255) NOT NULL DEFAULT '',
468 `body` mediumtext NOT NULL,
469 `app` varchar(255) NOT NULL DEFAULT '',
470 `verb` varchar(255) NOT NULL DEFAULT '',
471 `object-type` varchar(255) NOT NULL DEFAULT '',
472 `object` text NOT NULL,
473 `target-type` varchar(255) NOT NULL DEFAULT '',
474 `target` text NOT NULL,
475 `postopts` text NOT NULL,
476 `plink` varchar(255) NOT NULL DEFAULT '',
477 `resource-id` varchar(255) NOT NULL DEFAULT '',
478 `event-id` int(11) NOT NULL DEFAULT 0,
479 `tag` mediumtext NOT NULL,
480 `attach` mediumtext NOT NULL,
481 `inform` mediumtext NOT NULL,
482 `file` mediumtext NOT NULL,
483 `location` varchar(255) NOT NULL DEFAULT '',
484 `coord` varchar(255) NOT NULL DEFAULT '',
485 `allow_cid` mediumtext NOT NULL,
486 `allow_gid` mediumtext NOT NULL,
487 `deny_cid` mediumtext NOT NULL,
488 `deny_gid` mediumtext NOT NULL,
489 `private` tinyint(1) NOT NULL DEFAULT 0,
490 `pubmail` tinyint(1) NOT NULL DEFAULT 0,
491 `moderated` tinyint(1) NOT NULL DEFAULT 0,
492 `visible` tinyint(1) NOT NULL DEFAULT 0,
493 `spam` tinyint(1) NOT NULL DEFAULT 0,
494 `starred` tinyint(1) NOT NULL DEFAULT 0,
495 `bookmark` tinyint(1) NOT NULL DEFAULT 0,
496 `unseen` tinyint(1) NOT NULL DEFAULT 1,
497 `deleted` tinyint(1) NOT NULL DEFAULT 0,
498 `origin` tinyint(1) NOT NULL DEFAULT 0,
499 `forum_mode` tinyint(1) NOT NULL DEFAULT 0,
500 `last-child` tinyint(1) unsigned NOT NULL DEFAULT 1,
501 `mention` tinyint(1) NOT NULL DEFAULT 0,
502 `network` varchar(32) NOT NULL DEFAULT '',
503 `rendered-hash` varchar(32) NOT NULL DEFAULT '',
504 `rendered-html` mediumtext NOT NULL,
505 `global` tinyint(1) NOT NULL DEFAULT 0,
507 INDEX `guid` (`guid`),
509 INDEX `parent` (`parent`),
510 INDEX `parent-uri` (`parent-uri`),
511 INDEX `extid` (`extid`),
512 INDEX `uid_id` (`uid`,`id`),
513 INDEX `uid_created` (`uid`,`created`),
514 INDEX `uid_unseen` (`uid`,`unseen`),
515 INDEX `uid_network_received` (`uid`,`network`,`received`),
516 INDEX `uid_received` (`uid`,`received`),
517 INDEX `uid_network_commented` (`uid`,`network`,`commented`),
518 INDEX `uid_commented` (`uid`,`commented`),
519 INDEX `uid_title` (`uid`,`title`),
520 INDEX `uid_thrparent` (`uid`,`thr-parent`),
521 INDEX `uid_parenturi` (`uid`,`parent-uri`),
522 INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
523 INDEX `gcontactid_uid_created` (`gcontact-id`,`uid`,`created`),
524 INDEX `wall_body` (`wall`,`body`(6)),
525 INDEX `uid_visible_moderated_created` (`uid`,`visible`,`moderated`,`created`),
526 INDEX `uid_uri` (`uid`,`uri`),
527 INDEX `uid_wall_created` (`uid`,`wall`,`created`),
528 INDEX `resource-id` (`resource-id`),
529 INDEX `uid_type` (`uid`,`type`),
530 INDEX `uid_starred` (`uid`,`starred`),
531 INDEX `contactid_allowcid_allowpid_denycid_denygid` (`contact-id`,`allow_cid`(10),`allow_gid`(10),`deny_cid`(10),`deny_gid`(10)),
532 INDEX `uid_wall_parent_created` (`uid`,`wall`,`parent`,`created`),
533 INDEX `uid_type_changed` (`uid`,`type`,`changed`),
534 INDEX `contactid_verb` (`contact-id`,`verb`),
535 INDEX `deleted_changed` (`deleted`,`changed`),
536 INDEX `uid_wall_changed` (`uid`,`wall`,`changed`),
537 INDEX `uid_eventid` (`uid`,`event-id`),
538 INDEX `uid_authorlink` (`uid`,`author-link`),
539 INDEX `uid_ownerlink` (`uid`,`owner-link`)
540 ) DEFAULT CHARSET=utf8;
545 CREATE TABLE IF NOT EXISTS `item_id` (
546 `id` int(11) NOT NULL auto_increment,
547 `iid` int(11) NOT NULL DEFAULT 0,
548 `uid` int(11) NOT NULL DEFAULT 0,
549 `sid` varchar(255) NOT NULL DEFAULT '',
550 `service` varchar(255) NOT NULL DEFAULT '',
554 INDEX `service` (`service`),
556 ) DEFAULT CHARSET=utf8;
561 CREATE TABLE IF NOT EXISTS `locks` (
562 `id` int(11) NOT NULL auto_increment,
563 `name` varchar(128) NOT NULL DEFAULT '',
564 `locked` tinyint(1) NOT NULL DEFAULT 0,
565 `created` datetime DEFAULT '0000-00-00 00:00:00',
567 ) DEFAULT CHARSET=utf8;
572 CREATE TABLE IF NOT EXISTS `mail` (
573 `id` int(10) unsigned NOT NULL auto_increment,
574 `uid` int(10) unsigned NOT NULL DEFAULT 0,
575 `guid` varchar(64) NOT NULL DEFAULT '',
576 `from-name` varchar(255) NOT NULL DEFAULT '',
577 `from-photo` varchar(255) NOT NULL DEFAULT '',
578 `from-url` varchar(255) NOT NULL DEFAULT '',
579 `contact-id` varchar(255) NOT NULL DEFAULT '',
580 `convid` int(11) unsigned NOT NULL DEFAULT 0,
581 `title` varchar(255) NOT NULL DEFAULT '',
582 `body` mediumtext NOT NULL,
583 `seen` tinyint(1) NOT NULL DEFAULT 0,
584 `reply` tinyint(1) NOT NULL DEFAULT 0,
585 `replied` tinyint(1) NOT NULL DEFAULT 0,
586 `unknown` tinyint(1) NOT NULL DEFAULT 0,
587 `uri` varchar(255) NOT NULL DEFAULT '',
588 `parent-uri` varchar(255) NOT NULL DEFAULT '',
589 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
592 INDEX `guid` (`guid`),
593 INDEX `convid` (`convid`),
594 INDEX `reply` (`reply`),
596 INDEX `parent-uri` (`parent-uri`)
597 ) DEFAULT CHARSET=utf8;
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 '',
610 `pass` text NOT NULL,
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 '0000-00-00 00:00:00',
617 ) DEFAULT CHARSET=utf8;
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 INDEX `uid_mid` (`uid`,`mid`)
628 ) DEFAULT CHARSET=utf8;
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 '0000-00-00 00:00:00',
641 `msg` mediumtext NOT NULL,
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 '',
651 ) DEFAULT CHARSET=utf8;
654 -- TABLE notify-threads
656 CREATE TABLE IF NOT EXISTS `notify-threads` (
657 `id` int(11) NOT NULL auto_increment,
658 `notify-id` int(11) NOT NULL DEFAULT 0,
659 `master-parent-item` int(10) unsigned NOT NULL DEFAULT 0,
660 `parent-item` int(10) unsigned NOT NULL DEFAULT 0,
661 `receiver-uid` int(11) NOT NULL DEFAULT 0,
663 INDEX `master-parent-item` (`master-parent-item`),
664 INDEX `receiver-uid` (`receiver-uid`)
665 ) DEFAULT CHARSET=utf8;
670 CREATE TABLE IF NOT EXISTS `oembed` (
671 `url` varchar(255) NOT NULL,
672 `content` text NOT NULL,
673 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
675 INDEX `created` (`created`)
676 ) DEFAULT CHARSET=utf8;
681 CREATE TABLE IF NOT EXISTS `parsed_url` (
682 `url` varchar(255) NOT NULL,
683 `guessing` tinyint(1) NOT NULL DEFAULT 0,
684 `oembed` tinyint(1) NOT NULL DEFAULT 0,
685 `content` text NOT NULL,
686 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
687 PRIMARY KEY(`url`,`guessing`,`oembed`),
688 INDEX `created` (`created`)
689 ) DEFAULT CHARSET=utf8;
694 CREATE TABLE IF NOT EXISTS `pconfig` (
695 `id` int(11) NOT NULL auto_increment,
696 `uid` int(11) NOT NULL DEFAULT 0,
697 `cat` varchar(255) NOT NULL DEFAULT '',
698 `k` varchar(255) NOT NULL DEFAULT '',
699 `v` mediumtext NOT NULL,
701 INDEX `uid_cat_k` (`uid`,`cat`(30),`k`(30))
702 ) DEFAULT CHARSET=utf8;
707 CREATE TABLE IF NOT EXISTS `photo` (
708 `id` int(10) unsigned NOT NULL auto_increment,
709 `uid` int(10) unsigned NOT NULL DEFAULT 0,
710 `contact-id` int(10) unsigned NOT NULL DEFAULT 0,
711 `guid` varchar(64) NOT NULL DEFAULT '',
712 `resource-id` varchar(255) NOT NULL DEFAULT '',
713 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
714 `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
715 `title` varchar(255) NOT NULL DEFAULT '',
716 `desc` text NOT NULL,
717 `album` varchar(255) NOT NULL DEFAULT '',
718 `filename` varchar(255) NOT NULL DEFAULT '',
719 `type` varchar(128) NOT NULL DEFAULT 'image/jpeg',
720 `height` smallint(6) NOT NULL DEFAULT 0,
721 `width` smallint(6) NOT NULL DEFAULT 0,
722 `datasize` int(10) unsigned NOT NULL DEFAULT 0,
723 `data` mediumblob NOT NULL,
724 `scale` tinyint(3) NOT NULL DEFAULT 0,
725 `profile` tinyint(1) NOT NULL DEFAULT 0,
726 `allow_cid` mediumtext NOT NULL,
727 `allow_gid` mediumtext NOT NULL,
728 `deny_cid` mediumtext NOT NULL,
729 `deny_gid` mediumtext NOT NULL,
732 INDEX `resource-id` (`resource-id`),
733 INDEX `guid` (`guid`)
734 ) DEFAULT CHARSET=utf8;
739 CREATE TABLE IF NOT EXISTS `poll` (
740 `id` int(11) NOT NULL auto_increment,
741 `uid` int(11) NOT NULL DEFAULT 0,
742 `q0` mediumtext NOT NULL,
743 `q1` mediumtext NOT NULL,
744 `q2` mediumtext NOT NULL,
745 `q3` mediumtext NOT NULL,
746 `q4` mediumtext NOT NULL,
747 `q5` mediumtext NOT NULL,
748 `q6` mediumtext NOT NULL,
749 `q7` mediumtext NOT NULL,
750 `q8` mediumtext NOT NULL,
751 `q9` mediumtext NOT NULL,
754 ) DEFAULT CHARSET=utf8;
759 CREATE TABLE IF NOT EXISTS `poll_result` (
760 `id` int(11) NOT NULL auto_increment,
761 `poll_id` int(11) NOT NULL DEFAULT 0,
762 `choice` int(11) NOT NULL DEFAULT 0,
764 INDEX `poll_id` (`poll_id`),
765 INDEX `choice` (`choice`)
766 ) DEFAULT CHARSET=utf8;
771 CREATE TABLE IF NOT EXISTS `profile` (
772 `id` int(11) NOT NULL auto_increment,
773 `uid` int(11) NOT NULL DEFAULT 0,
774 `profile-name` varchar(255) NOT NULL DEFAULT '',
775 `is-default` tinyint(1) NOT NULL DEFAULT 0,
776 `hide-friends` tinyint(1) NOT NULL DEFAULT 0,
777 `name` varchar(255) NOT NULL DEFAULT '',
778 `pdesc` varchar(255) NOT NULL DEFAULT '',
779 `dob` varchar(32) NOT NULL DEFAULT '0000-00-00',
780 `address` varchar(255) NOT NULL DEFAULT '',
781 `locality` varchar(255) NOT NULL DEFAULT '',
782 `region` varchar(255) NOT NULL DEFAULT '',
783 `postal-code` varchar(32) NOT NULL DEFAULT '',
784 `country-name` varchar(255) NOT NULL DEFAULT '',
785 `hometown` varchar(255) NOT NULL DEFAULT '',
786 `gender` varchar(32) NOT NULL DEFAULT '',
787 `marital` varchar(255) NOT NULL DEFAULT '',
788 `with` text NOT NULL,
789 `howlong` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
790 `sexual` varchar(255) NOT NULL DEFAULT '',
791 `politic` varchar(255) NOT NULL DEFAULT '',
792 `religion` varchar(255) NOT NULL DEFAULT '',
793 `pub_keywords` text NOT NULL,
794 `prv_keywords` text NOT NULL,
795 `likes` text NOT NULL,
796 `dislikes` text NOT NULL,
797 `about` text NOT NULL,
798 `summary` varchar(255) NOT NULL DEFAULT '',
799 `music` text NOT NULL,
800 `book` text NOT NULL,
802 `film` text NOT NULL,
803 `interest` text NOT NULL,
804 `romance` text NOT NULL,
805 `work` text NOT NULL,
806 `education` text NOT NULL,
807 `contact` text NOT NULL,
808 `homepage` varchar(255) NOT NULL DEFAULT '',
809 `photo` varchar(255) NOT NULL DEFAULT '',
810 `thumb` varchar(255) NOT NULL DEFAULT '',
811 `publish` tinyint(1) NOT NULL DEFAULT 0,
812 `net-publish` tinyint(1) NOT NULL DEFAULT 0,
814 INDEX `hometown` (`hometown`)
815 ) DEFAULT CHARSET=utf8;
818 -- TABLE profile_check
820 CREATE TABLE IF NOT EXISTS `profile_check` (
821 `id` int(10) unsigned NOT NULL auto_increment,
822 `uid` int(10) unsigned NOT NULL DEFAULT 0,
823 `cid` int(10) unsigned NOT NULL DEFAULT 0,
824 `dfrn_id` varchar(255) NOT NULL DEFAULT '',
825 `sec` varchar(255) NOT NULL DEFAULT '',
826 `expire` int(11) NOT NULL DEFAULT 0,
828 ) DEFAULT CHARSET=utf8;
831 -- TABLE push_subscriber
833 CREATE TABLE IF NOT EXISTS `push_subscriber` (
834 `id` int(11) NOT NULL auto_increment,
835 `uid` int(11) NOT NULL DEFAULT 0,
836 `callback_url` varchar(255) NOT NULL DEFAULT '',
837 `topic` varchar(255) NOT NULL DEFAULT '',
838 `nickname` varchar(255) NOT NULL DEFAULT '',
839 `push` int(11) NOT NULL DEFAULT 0,
840 `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
841 `secret` varchar(255) NOT NULL DEFAULT '',
843 ) DEFAULT CHARSET=utf8;
848 CREATE TABLE IF NOT EXISTS `queue` (
849 `id` int(11) NOT NULL auto_increment,
850 `cid` int(11) NOT NULL DEFAULT 0,
851 `network` varchar(32) NOT NULL DEFAULT '',
852 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
853 `last` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
854 `content` mediumtext NOT NULL,
855 `batch` tinyint(1) NOT NULL DEFAULT 0,
858 INDEX `created` (`created`),
859 INDEX `last` (`last`),
860 INDEX `network` (`network`),
861 INDEX `batch` (`batch`)
862 ) DEFAULT CHARSET=utf8;
867 CREATE TABLE IF NOT EXISTS `register` (
868 `id` int(11) unsigned NOT NULL auto_increment,
869 `hash` varchar(255) NOT NULL DEFAULT '',
870 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
871 `uid` int(11) unsigned NOT NULL DEFAULT 0,
872 `password` varchar(255) NOT NULL DEFAULT '',
873 `language` varchar(16) NOT NULL DEFAULT '',
875 ) DEFAULT CHARSET=utf8;
880 CREATE TABLE IF NOT EXISTS `search` (
881 `id` int(11) NOT NULL auto_increment,
882 `uid` int(11) NOT NULL DEFAULT 0,
883 `term` varchar(255) NOT NULL DEFAULT '',
886 INDEX `term` (`term`)
887 ) DEFAULT CHARSET=utf8;
892 CREATE TABLE IF NOT EXISTS `session` (
893 `id` bigint(20) unsigned NOT NULL auto_increment,
894 `sid` varchar(255) NOT NULL DEFAULT '',
895 `data` text NOT NULL,
896 `expire` int(10) unsigned NOT NULL DEFAULT 0,
899 INDEX `expire` (`expire`)
900 ) DEFAULT CHARSET=utf8;
905 CREATE TABLE IF NOT EXISTS `sign` (
906 `id` int(10) unsigned NOT NULL auto_increment,
907 `iid` int(10) unsigned NOT NULL DEFAULT 0,
908 `signed_text` mediumtext NOT NULL,
909 `signature` text NOT NULL,
910 `signer` varchar(255) NOT NULL DEFAULT '',
913 ) DEFAULT CHARSET=utf8;
918 CREATE TABLE IF NOT EXISTS `spam` (
919 `id` int(11) NOT NULL auto_increment,
920 `uid` int(11) NOT NULL DEFAULT 0,
921 `spam` int(11) NOT NULL DEFAULT 0,
922 `ham` int(11) NOT NULL DEFAULT 0,
923 `term` varchar(255) NOT NULL DEFAULT '',
924 `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
927 INDEX `spam` (`spam`),
929 INDEX `term` (`term`)
930 ) DEFAULT CHARSET=utf8;
935 CREATE TABLE IF NOT EXISTS `term` (
936 `tid` int(10) unsigned NOT NULL auto_increment,
937 `oid` int(10) unsigned NOT NULL DEFAULT 0,
938 `otype` tinyint(3) unsigned NOT NULL DEFAULT 0,
939 `type` tinyint(3) unsigned NOT NULL DEFAULT 0,
940 `term` varchar(255) NOT NULL DEFAULT '',
941 `url` varchar(255) NOT NULL DEFAULT '',
942 `guid` varchar(255) NOT NULL DEFAULT '',
943 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
944 `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
945 `global` tinyint(1) NOT NULL DEFAULT 0,
946 `aid` int(10) unsigned NOT NULL DEFAULT 0,
947 `uid` int(10) unsigned NOT NULL DEFAULT 0,
949 INDEX `oid_otype_type_term` (`oid`,`otype`,`type`,`term`),
950 INDEX `uid_term_tid` (`uid`,`term`,`tid`),
951 INDEX `type_term` (`type`,`term`),
952 INDEX `uid_otype_type_term_global_created` (`uid`,`otype`,`type`,`term`,`global`,`created`),
953 INDEX `otype_type_term_tid` (`otype`,`type`,`term`,`tid`),
954 INDEX `guid` (`guid`)
955 ) DEFAULT CHARSET=utf8;
960 CREATE TABLE IF NOT EXISTS `thread` (
961 `iid` int(10) unsigned NOT NULL DEFAULT 0,
962 `uid` int(10) unsigned NOT NULL DEFAULT 0,
963 `contact-id` int(11) unsigned NOT NULL DEFAULT 0,
964 `gcontact-id` int(11) unsigned NOT NULL DEFAULT 0,
965 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
966 `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
967 `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
968 `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
969 `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
970 `wall` tinyint(1) NOT NULL DEFAULT 0,
971 `private` tinyint(1) NOT NULL DEFAULT 0,
972 `pubmail` tinyint(1) NOT NULL DEFAULT 0,
973 `moderated` tinyint(1) NOT NULL DEFAULT 0,
974 `visible` tinyint(1) NOT NULL DEFAULT 0,
975 `spam` tinyint(1) NOT NULL DEFAULT 0,
976 `starred` tinyint(1) NOT NULL DEFAULT 0,
977 `ignored` tinyint(1) NOT NULL DEFAULT 0,
978 `bookmark` tinyint(1) NOT NULL DEFAULT 0,
979 `unseen` tinyint(1) NOT NULL DEFAULT 1,
980 `deleted` tinyint(1) NOT NULL DEFAULT 0,
981 `origin` tinyint(1) NOT NULL DEFAULT 0,
982 `forum_mode` tinyint(1) NOT NULL DEFAULT 0,
983 `mention` tinyint(1) NOT NULL DEFAULT 0,
984 `network` varchar(32) NOT NULL DEFAULT '',
986 INDEX `created` (`created`),
987 INDEX `commented` (`commented`),
988 INDEX `uid_network_commented` (`uid`,`network`,`commented`),
989 INDEX `uid_network_created` (`uid`,`network`,`created`),
990 INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`),
991 INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
992 INDEX `uid_gcontactid_commented` (`uid`,`gcontact-id`,`commented`),
993 INDEX `uid_gcontactid_created` (`uid`,`gcontact-id`,`created`),
994 INDEX `wall_private_received` (`wall`,`private`,`received`),
995 INDEX `uid_created` (`uid`,`created`),
996 INDEX `uid_commented` (`uid`,`commented`)
997 ) DEFAULT CHARSET=utf8;
1002 CREATE TABLE IF NOT EXISTS `tokens` (
1003 `id` varchar(40) NOT NULL,
1004 `secret` text NOT NULL,
1005 `client_id` varchar(20) NOT NULL DEFAULT '',
1006 `expires` int(11) NOT NULL DEFAULT 0,
1007 `scope` varchar(200) NOT NULL DEFAULT '',
1008 `uid` int(11) NOT NULL DEFAULT 0,
1010 ) DEFAULT CHARSET=utf8;
1015 CREATE TABLE IF NOT EXISTS `user` (
1016 `uid` int(11) NOT NULL auto_increment,
1017 `guid` varchar(64) NOT NULL DEFAULT '',
1018 `username` varchar(255) NOT NULL DEFAULT '',
1019 `password` varchar(255) NOT NULL DEFAULT '',
1020 `nickname` varchar(255) NOT NULL DEFAULT '',
1021 `email` varchar(255) NOT NULL DEFAULT '',
1022 `openid` varchar(255) NOT NULL DEFAULT '',
1023 `timezone` varchar(128) NOT NULL DEFAULT '',
1024 `language` varchar(32) NOT NULL DEFAULT 'en',
1025 `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1026 `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1027 `default-location` varchar(255) NOT NULL DEFAULT '',
1028 `allow_location` tinyint(1) NOT NULL DEFAULT 0,
1029 `theme` varchar(255) NOT NULL DEFAULT '',
1030 `pubkey` text NOT NULL,
1031 `prvkey` text NOT NULL,
1032 `spubkey` text NOT NULL,
1033 `sprvkey` text NOT NULL,
1034 `verified` tinyint(1) unsigned NOT NULL DEFAULT 0,
1035 `blocked` tinyint(1) unsigned NOT NULL DEFAULT 0,
1036 `blockwall` tinyint(1) unsigned NOT NULL DEFAULT 0,
1037 `hidewall` tinyint(1) unsigned NOT NULL DEFAULT 0,
1038 `blocktags` tinyint(1) unsigned NOT NULL DEFAULT 0,
1039 `unkmail` tinyint(1) NOT NULL DEFAULT 0,
1040 `cntunkmail` int(11) NOT NULL DEFAULT 10,
1041 `notify-flags` int(11) unsigned NOT NULL DEFAULT 65535,
1042 `page-flags` int(11) unsigned NOT NULL DEFAULT 0,
1043 `prvnets` tinyint(1) NOT NULL DEFAULT 0,
1044 `pwdreset` varchar(255) NOT NULL DEFAULT '',
1045 `maxreq` int(11) NOT NULL DEFAULT 10,
1046 `expire` int(11) unsigned NOT NULL DEFAULT 0,
1047 `account_removed` tinyint(1) NOT NULL DEFAULT 0,
1048 `account_expired` tinyint(1) NOT NULL DEFAULT 0,
1049 `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1050 `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1051 `service_class` varchar(32) NOT NULL DEFAULT '',
1052 `def_gid` int(11) NOT NULL DEFAULT 0,
1053 `allow_cid` mediumtext NOT NULL,
1054 `allow_gid` mediumtext NOT NULL,
1055 `deny_cid` mediumtext NOT NULL,
1056 `deny_gid` mediumtext NOT NULL,
1057 `openidserver` text NOT NULL,
1059 INDEX `nickname` (`nickname`)
1060 ) DEFAULT CHARSET=utf8;
1065 CREATE TABLE IF NOT EXISTS `userd` (
1066 `id` int(11) NOT NULL auto_increment,
1067 `username` varchar(255) NOT NULL,
1069 INDEX `username` (`username`)
1070 ) DEFAULT CHARSET=utf8;
1073 -- TABLE workerqueue
1075 CREATE TABLE IF NOT EXISTS `workerqueue` (
1076 `id` int(11) NOT NULL auto_increment,
1077 `parameter` text NOT NULL,
1078 `priority` tinyint(3) unsigned NOT NULL DEFAULT 0,
1079 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1080 `pid` int(11) NOT NULL DEFAULT 0,
1081 `executed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1083 INDEX `created` (`created`)
1084 ) DEFAULT CHARSET=utf8;