3 -- http://www.phpmyadmin.net
6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
8 -- --------------------------------------------------------
11 -- Table structure for table `addon`
14 CREATE TABLE IF NOT EXISTS `addon` (
15 `id` int(11) NOT NULL AUTO_INCREMENT,
16 `name` char(255) NOT NULL,
17 `version` char(255) NOT NULL,
18 `installed` tinyint(1) NOT NULL DEFAULT '0',
19 `hidden` tinyint(1) NOT NULL DEFAULT '0',
20 `timestamp` bigint(20) NOT NULL DEFAULT '0',
21 `plugin_admin` tinyint(1) NOT NULL DEFAULT '0',
23 KEY `hidden` (`hidden`)
24 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
26 -- --------------------------------------------------------
29 -- Table structure for table `attach`
32 CREATE TABLE IF NOT EXISTS `attach` (
33 `id` int(11) NOT NULL AUTO_INCREMENT,
34 `uid` int(11) NOT NULL,
35 `hash` char(64) NOT NULL,
36 `filename` char(255) NOT NULL,
37 `filetype` char(64) NOT NULL,
38 `filesize` int(11) NOT NULL,
39 `data` longblob NOT NULL,
40 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
41 `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
42 `allow_cid` mediumtext NOT NULL,
43 `allow_gid` mediumtext NOT NULL,
44 `deny_cid` mediumtext NOT NULL,
45 `deny_gid` mediumtext NOT NULL,
47 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
49 -- --------------------------------------------------------
52 -- Table structure for table `auth_codes`
55 CREATE TABLE IF NOT EXISTS `auth_codes` (
56 `id` varchar(40) NOT NULL,
57 `client_id` varchar(20) NOT NULL,
58 `redirect_uri` varchar(200) NOT NULL,
59 `expires` int(11) NOT NULL,
60 `scope` varchar(250) NOT NULL,
62 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
64 -- --------------------------------------------------------
67 -- Table structure for table `cache`
70 CREATE TABLE IF NOT EXISTS `cache` (
71 `k` char(255) NOT NULL,
73 `updated` datetime NOT NULL,
75 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
77 -- --------------------------------------------------------
80 -- Table structure for table `challenge`
83 CREATE TABLE IF NOT EXISTS `challenge` (
84 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
85 `challenge` char(255) NOT NULL,
86 `dfrn-id` char(255) NOT NULL,
87 `expire` int(11) NOT NULL,
88 `type` char(255) NOT NULL,
89 `last_update` char(255) NOT NULL,
91 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
93 -- --------------------------------------------------------
96 -- Table structure for table `clients`
99 CREATE TABLE IF NOT EXISTS `clients` (
100 `client_id` varchar(20) NOT NULL,
101 `pw` varchar(20) NOT NULL,
102 `redirect_uri` varchar(200) NOT NULL,
105 `uid` int(11) NOT NULL DEFAULT '0',
106 PRIMARY KEY (`client_id`)
107 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
109 -- --------------------------------------------------------
112 -- Table structure for table `config`
115 CREATE TABLE IF NOT EXISTS `config` (
116 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
117 `cat` char(255) CHARACTER SET ascii NOT NULL,
118 `k` char(255) CHARACTER SET ascii NOT NULL,
121 UNIQUE KEY `access` (`cat`,`k`)
122 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
124 -- --------------------------------------------------------
127 -- Table structure for table `contact`
130 CREATE TABLE IF NOT EXISTS `contact` (
131 `id` int(11) NOT NULL AUTO_INCREMENT,
132 `uid` int(11) NOT NULL COMMENT 'owner uid',
133 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
134 `self` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'boolean 1 == info for local UID, primarily name and photo to use in item displays.',
135 `remote_self` tinyint(1) NOT NULL DEFAULT '0',
136 `rel` tinyint(1) NOT NULL DEFAULT '0',
137 `duplex` tinyint(1) NOT NULL DEFAULT '0',
138 `network` char(255) NOT NULL,
139 `name` char(255) NOT NULL,
140 `nick` char(255) NOT NULL,
141 `attag` char(255) NOT NULL,
142 `photo` text NOT NULL COMMENT 'remote photo URL initially until approved',
143 `thumb` text NOT NULL,
144 `micro` text NOT NULL,
145 `site-pubkey` text NOT NULL,
146 `issued-id` char(255) NOT NULL,
147 `dfrn-id` char(255) NOT NULL,
148 `url` char(255) NOT NULL,
149 `nurl` char(255) NOT NULL,
150 `addr` char(255) NOT NULL,
151 `alias` char(255) NOT NULL,
152 `pubkey` text NOT NULL,
153 `prvkey` text NOT NULL,
154 `batch` char(255) NOT NULL,
155 `request` text NOT NULL,
156 `notify` text NOT NULL,
157 `poll` text NOT NULL,
158 `confirm` text NOT NULL,
159 `poco` text NOT NULL,
160 `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
161 `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
162 `usehub` tinyint(1) NOT NULL DEFAULT '0',
163 `subhub` tinyint(1) NOT NULL DEFAULT '0',
164 `hub-verify` char(255) NOT NULL,
165 `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
166 `success_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
167 `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
168 `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
169 `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
170 `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
171 `priority` tinyint(3) NOT NULL,
172 `blocked` tinyint(1) NOT NULL DEFAULT '1',
173 `readonly` tinyint(1) NOT NULL DEFAULT '0',
174 `writable` tinyint(1) NOT NULL DEFAULT '0',
175 `forum` tinyint(1) NOT NULL DEFAULT '0',
176 `prv` tinyint(1) NOT NULL DEFAULT '0',
177 `hidden` tinyint(1) NOT NULL DEFAULT '0',
178 `archive` tinyint(1) NOT NULL DEFAULT '0',
179 `pending` tinyint(1) NOT NULL DEFAULT '1',
180 `rating` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0-5 reputation, 0 unknown, 1 call police, 5 inscrutable',
181 `reason` text NOT NULL COMMENT 'why a rating was given - will help friends decide to make friends or not',
182 `closeness` tinyint(2) NOT NULL DEFAULT '99',
183 `info` mediumtext NOT NULL,
184 `profile-id` int(11) NOT NULL DEFAULT '0' COMMENT 'which profile to display - 0 is public default',
185 `bdyear` char(4) NOT NULL COMMENT 'birthday notify flag',
187 `notify_new_posts` TINYINT(1) NOT NULL DEFAULT '0',
188 `fetch_further_information` TINYINT(1) NOT NULL DEFAULT '0',
192 KEY `issued-id` (`issued-id`),
193 KEY `dfrn-id` (`dfrn-id`),
194 KEY `blocked` (`blocked`),
195 KEY `readonly` (`readonly`),
196 KEY `network` (`network`),
199 KEY `attag` (`attag`),
202 KEY `batch` (`batch`),
204 KEY `pending` (`pending`),
205 KEY `hidden` (`hidden`),
206 KEY `archive` (`archive`),
207 KEY `forum` (`forum`)
208 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
210 -- --------------------------------------------------------
213 -- Table structure for table `conv`
216 CREATE TABLE IF NOT EXISTS `conv` (
217 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
218 `guid` char(64) NOT NULL,
219 `recips` mediumtext NOT NULL,
220 `uid` int(11) NOT NULL,
221 `creator` char(255) NOT NULL,
222 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
223 `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
224 `subject` mediumtext NOT NULL,
226 KEY `created` (`created`),
227 KEY `updated` (`updated`)
228 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
230 -- --------------------------------------------------------
233 -- Table structure for table `deliverq`
236 CREATE TABLE IF NOT EXISTS `deliverq` (
237 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
238 `cmd` char(32) NOT NULL,
239 `item` int(11) NOT NULL,
240 `contact` int(11) NOT NULL,
242 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
244 -- --------------------------------------------------------
247 -- Table structure for table `dsprphotoq`
250 CREATE TABLE `dsprphotoq` (
251 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
252 `uid` int(11) NOT NULL,
253 `msg` mediumtext NOT NULL,
254 `attempt` tinyint(4) NOT NULL,
256 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
258 -- --------------------------------------------------------
261 -- Table structure for table `event`
264 CREATE TABLE IF NOT EXISTS `event` (
265 `id` int(11) NOT NULL AUTO_INCREMENT,
266 `uid` int(11) NOT NULL,
267 `cid` int(11) NOT NULL,
268 `uri` char(255) NOT NULL,
269 `created` datetime NOT NULL,
270 `edited` datetime NOT NULL,
271 `start` datetime NOT NULL,
272 `finish` datetime NOT NULL,
273 `summary` text NOT NULL,
274 `desc` text NOT NULL,
275 `location` text NOT NULL,
276 `type` char(255) NOT NULL,
277 `nofinish` tinyint(1) NOT NULL DEFAULT '0',
278 `adjust` tinyint(1) NOT NULL DEFAULT '1',
279 `ignore` tinyint(1) NOT NULL DEFAULT '0',
280 `allow_cid` mediumtext NOT NULL,
281 `allow_gid` mediumtext NOT NULL,
282 `deny_cid` mediumtext NOT NULL,
283 `deny_gid` mediumtext NOT NULL,
288 KEY `type` ( `type` ),
289 KEY `start` ( `start` ),
290 KEY `finish` ( `finish` ),
291 KEY `adjust` ( `adjust` ),
292 KEY `ignore` ( `ignore` )
293 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
295 -- --------------------------------------------------------
298 -- Table structure for table `fcontact`
301 CREATE TABLE IF NOT EXISTS `fcontact` (
302 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
303 `url` char(255) NOT NULL,
304 `name` char(255) NOT NULL,
305 `photo` char(255) NOT NULL,
306 `request` char(255) NOT NULL,
307 `nick` char(255) NOT NULL,
308 `addr` char(255) NOT NULL,
309 `batch` char(255) NOT NULL,
310 `notify` char(255) NOT NULL,
311 `poll` char(255) NOT NULL,
312 `confirm` char(255) NOT NULL,
313 `priority` tinyint(1) NOT NULL,
314 `network` char(32) NOT NULL,
315 `alias` char(255) NOT NULL,
316 `pubkey` text NOT NULL,
317 `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
320 KEY `network` (`network`)
321 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
323 -- --------------------------------------------------------
326 -- Table structure for table `ffinder`
329 CREATE TABLE IF NOT EXISTS `ffinder` (
330 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
331 `uid` int(10) unsigned NOT NULL,
332 `cid` int(10) unsigned NOT NULL,
333 `fid` int(10) unsigned NOT NULL,
335 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
337 -- --------------------------------------------------------
340 -- Table structure for table `fserver`
343 CREATE TABLE IF NOT EXISTS `fserver` (
344 `id` int(11) NOT NULL AUTO_INCREMENT,
345 `server` char(255) NOT NULL,
346 `posturl` char(255) NOT NULL,
349 KEY `server` (`server`)
350 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
352 -- --------------------------------------------------------
355 -- Table structure for table `fsuggest`
358 CREATE TABLE IF NOT EXISTS `fsuggest` (
359 `id` int(11) NOT NULL AUTO_INCREMENT,
360 `uid` int(11) NOT NULL,
361 `cid` int(11) NOT NULL,
362 `name` char(255) NOT NULL,
363 `url` char(255) NOT NULL,
364 `request` char(255) NOT NULL,
365 `photo` char(255) NOT NULL,
366 `note` text NOT NULL,
367 `created` datetime NOT NULL,
369 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
371 -- --------------------------------------------------------
374 -- Table structure for table `gcign`
377 CREATE TABLE IF NOT EXISTS `gcign` (
378 `id` int(11) NOT NULL AUTO_INCREMENT,
379 `uid` int(11) NOT NULL,
380 `gcid` int(11) NOT NULL,
384 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
386 -- --------------------------------------------------------
389 -- Table structure for table `gcontact`
392 CREATE TABLE IF NOT EXISTS `gcontact` (
393 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
394 `name` char(255) NOT NULL,
395 `url` char(255) NOT NULL,
396 `nurl` char(255) NOT NULL,
397 `photo` char(255) NOT NULL,
398 `connect` char(255) NOT NULL,
401 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
403 -- --------------------------------------------------------
406 -- Table structure for table `glink`
409 CREATE TABLE IF NOT EXISTS `glink` (
410 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
411 `cid` int(11) NOT NULL,
412 `uid` int(11) NOT NULL,
413 `gcid` int(11) NOT NULL,
414 `zcid` int(11) NOT NULL,
415 `updated` datetime NOT NULL,
421 KEY `updated` (`updated`)
422 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
424 -- --------------------------------------------------------
427 -- Table structure for table `group`
430 CREATE TABLE IF NOT EXISTS `group` (
431 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
432 `uid` int(10) unsigned NOT NULL,
433 `visible` tinyint(1) NOT NULL DEFAULT '0',
434 `deleted` tinyint(1) NOT NULL DEFAULT '0',
435 `name` char(255) NOT NULL,
437 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
439 -- --------------------------------------------------------
442 -- Table structure for table `group_member`
445 CREATE TABLE IF NOT EXISTS `group_member` (
446 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
447 `uid` int(10) unsigned NOT NULL,
448 `gid` int(10) unsigned NOT NULL,
449 `contact-id` int(10) unsigned NOT NULL,
451 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
453 -- --------------------------------------------------------
456 -- Table structure for table `guid`
459 CREATE TABLE IF NOT EXISTS `guid` (
460 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
461 `guid` char(64) NOT NULL,
464 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
466 -- --------------------------------------------------------
469 -- Table structure for table `hook`
472 CREATE TABLE IF NOT EXISTS `hook` (
473 `id` int(11) NOT NULL AUTO_INCREMENT,
474 `hook` char(255) NOT NULL,
475 `file` char(255) NOT NULL,
476 `function` char(255) NOT NULL,
477 `priority` int(11) UNSIGNED NOT NULL DEFAULT '0',
479 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
481 -- --------------------------------------------------------
484 -- Table structure for table `intro`
487 CREATE TABLE IF NOT EXISTS `intro` (
488 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
489 `uid` int(10) unsigned NOT NULL,
490 `fid` int(11) NOT NULL DEFAULT '0',
491 `contact-id` int(11) NOT NULL,
492 `knowyou` tinyint(1) NOT NULL,
493 `duplex` tinyint(1) NOT NULL DEFAULT '0',
494 `note` text NOT NULL,
495 `hash` char(255) NOT NULL,
496 `datetime` datetime NOT NULL,
497 `blocked` tinyint(1) NOT NULL DEFAULT '1',
498 `ignore` tinyint(1) NOT NULL DEFAULT '0',
500 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
502 -- --------------------------------------------------------
505 -- Table structure for table `item`
508 CREATE TABLE IF NOT EXISTS `item` (
509 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
510 `guid` char(64) NOT NULL,
511 `uri` char(255) CHARACTER SET ascii NOT NULL,
512 `uid` int(10) unsigned NOT NULL DEFAULT '0',
513 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
514 `type` char(255) NOT NULL,
515 `wall` tinyint(1) NOT NULL DEFAULT '0',
516 `gravity` tinyint(1) NOT NULL DEFAULT '0',
517 `parent` int(10) unsigned NOT NULL DEFAULT '0',
518 `parent-uri` char(255) CHARACTER SET ascii NOT NULL,
519 `extid` char(255) NOT NULL,
520 `thr-parent` char(255) NOT NULL,
521 `created` datetime NOT NULL,
522 `edited` datetime NOT NULL,
523 `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
524 `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
525 `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
526 `owner-name` char(255) NOT NULL,
527 `owner-link` char(255) NOT NULL,
528 `owner-avatar` char(255) NOT NULL,
529 `author-name` char(255) NOT NULL,
530 `author-link` char(255) NOT NULL,
531 `author-avatar` char(255) NOT NULL,
532 `title` char(255) NOT NULL,
533 `body` mediumtext NOT NULL,
534 `app` char(255) NOT NULL,
535 `verb` char(255) NOT NULL,
536 `object-type` char(255) NOT NULL,
537 `object` text NOT NULL,
538 `target-type` char(255) NOT NULL,
539 `target` text NOT NULL,
540 `postopts` text NOT NULL,
541 `plink` char(255) NOT NULL,
542 `resource-id` char(255) NOT NULL,
543 `event-id` int(11) NOT NULL,
544 `tag` mediumtext NOT NULL,
545 `attach` mediumtext NOT NULL,
546 `inform` mediumtext NOT NULL,
547 `file` mediumtext NOT NULL,
548 `location` char(255) NOT NULL,
549 `coord` char(255) NOT NULL,
550 `allow_cid` mediumtext NOT NULL,
551 `allow_gid` mediumtext NOT NULL,
552 `deny_cid` mediumtext NOT NULL,
553 `deny_gid` mediumtext NOT NULL,
554 `private` tinyint(1) NOT NULL DEFAULT '0',
555 `pubmail` tinyint(1) NOT NULL DEFAULT '0',
556 `moderated` tinyint(1) NOT NULL DEFAULT '0',
557 `visible` tinyint(1) NOT NULL DEFAULT '0',
558 `spam` tinyint(1) NOT NULL DEFAULT '0',
559 `starred` tinyint(1) NOT NULL DEFAULT '0',
560 `bookmark` tinyint(1) NOT NULL DEFAULT '0',
561 `unseen` tinyint(1) NOT NULL DEFAULT '1',
562 `deleted` tinyint(1) NOT NULL DEFAULT '0',
563 `origin` tinyint(1) NOT NULL DEFAULT '0',
564 `forum_mode` tinyint(1) NOT NULL DEFAULT '0',
565 `mention` tinyint(1) NOT NULL DEFAULT '0',
566 `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
567 `network` char(32) NOT NULL,
571 KEY `contact-id` (`contact-id`),
573 KEY `parent` (`parent`),
574 KEY `parent-uri` (`parent-uri`),
575 KEY `created` (`created`),
576 KEY `edited` (`edited`),
577 KEY `visible` (`visible`),
578 KEY `deleted` (`deleted`),
579 KEY `last-child` (`last-child`),
580 KEY `unseen` (`unseen`),
581 KEY `extid` (`extid`),
582 KEY `received` (`received`),
583 KEY `starred` (`starred`),
585 KEY `origin` (`origin`),
587 KEY `forum_mode` (`forum_mode`),
588 KEY `author-link` (`author-link`),
589 KEY `bookmark` (`bookmark`),
590 KEY `moderated` (`moderated`),
592 KEY `author-name` (`author-name`),
593 KEY `uid_commented` (`uid`, `commented`),
594 KEY `uid_created` (`uid`, `created`),
595 KEY `uid_unseen` (`uid`, `unseen`),
596 KEY `mention` (`mention`),
597 KEY `resource-id` (`resource-id`),
598 KEY `event_id` (`event-id`),
599 KEY `network` (`network`),
600 FULLTEXT KEY `title` (`title`),
601 FULLTEXT KEY `body` (`body`),
602 FULLTEXT KEY `allow_cid` (`allow_cid`),
603 FULLTEXT KEY `allow_gid` (`allow_gid`),
604 FULLTEXT KEY `deny_cid` (`deny_cid`),
605 FULLTEXT KEY `deny_gid` (`deny_gid`),
606 FULLTEXT KEY `tag` (`tag`),
607 FULLTEXT KEY `file` (`file`)
608 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
610 -- --------------------------------------------------------
613 -- Table structure for table `item_id`
616 CREATE TABLE IF NOT EXISTS `item_id` (
617 `id` int(11) NOT NULL AUTO_INCREMENT,
618 `iid` int(11) NOT NULL,
619 `uid` int(11) NOT NULL,
620 `sid` char(255) NOT NULL,
621 `service` char(255) NOT NULL,
626 KEY `service` (`service`)
627 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
629 -- --------------------------------------------------------
632 -- Table structure for table `locks`
635 CREATE TABLE IF NOT EXISTS `locks` (
636 `id` int(11) NOT NULL AUTO_INCREMENT,
637 `name` char(128) NOT NULL,
638 `locked` tinyint(1) NOT NULL DEFAULT '0',
640 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
642 -- --------------------------------------------------------
645 -- Table structure for table `mail`
648 CREATE TABLE IF NOT EXISTS `mail` (
649 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
650 `uid` int(10) unsigned NOT NULL,
651 `guid` char(64) NOT NULL,
652 `from-name` char(255) NOT NULL,
653 `from-photo` char(255) NOT NULL,
654 `from-url` char(255) NOT NULL,
655 `contact-id` char(255) NOT NULL,
656 `convid` int(11) NOT NULL,
657 `title` char(255) NOT NULL,
658 `body` mediumtext NOT NULL,
659 `seen` tinyint(1) NOT NULL,
660 `reply` tinyint(1) NOT NULL DEFAULT '0',
661 `replied` tinyint(1) NOT NULL,
662 `unknown` tinyint(1) NOT NULL DEFAULT '0',
663 `uri` char(255) NOT NULL,
664 `parent-uri` char(255) NOT NULL,
665 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
667 KEY `reply` (`reply`),
672 KEY `parent-uri` (`parent-uri`),
673 KEY `created` (`created`),
674 KEY `convid` (`convid`),
675 KEY `unknown` (`unknown`)
676 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
678 -- --------------------------------------------------------
681 -- Table structure for table `mailacct`
684 CREATE TABLE IF NOT EXISTS `mailacct` (
685 `id` int(11) NOT NULL AUTO_INCREMENT,
686 `uid` int(11) NOT NULL,
687 `server` char(255) NOT NULL,
688 `port` int(11) NOT NULL,
689 `ssltype` char(16) NOT NULL,
690 `mailbox` char(255) NOT NULL,
691 `user` char(255) NOT NULL,
692 `pass` text NOT NULL,
693 `action` int(11) NOT NULL,
694 `movetofolder` char(255) NOT NULL,
695 `reply_to` char(255) NOT NULL,
696 `pubmail` tinyint(1) NOT NULL DEFAULT '0',
697 `last_check` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
699 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
701 -- --------------------------------------------------------
704 -- Table structure for table `manage`
707 CREATE TABLE IF NOT EXISTS `manage` (
708 `id` int(11) NOT NULL AUTO_INCREMENT,
709 `uid` int(11) NOT NULL,
710 `mid` int(11) NOT NULL,
714 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
716 -- --------------------------------------------------------
719 -- Table structure for table `notify`
722 CREATE TABLE IF NOT EXISTS `notify` (
723 `id` int(11) NOT NULL AUTO_INCREMENT,
724 `hash` char(64) NOT NULL,
725 `name` char(255) NOT NULL,
726 `url` char(255) NOT NULL,
727 `photo` char(255) NOT NULL,
728 `date` datetime NOT NULL,
729 `msg` mediumtext NOT NULL,
730 `uid` int(11) NOT NULL,
731 `link` char(255) NOT NULL,
732 `parent` int(11) NOT NULL,
733 `seen` tinyint(1) NOT NULL DEFAULT '0',
734 `type` int(11) NOT NULL,
735 `verb` char(255) NOT NULL,
736 `otype` char(16) NOT NULL,
743 KEY `parent` (`parent`),
745 KEY `otype` (`otype`)
746 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
748 -- --------------------------------------------------------
751 -- Table structure for table `notify-threads`
754 CREATE TABLE IF NOT EXISTS `notify-threads` (
755 `id` int(11) NOT NULL AUTO_INCREMENT,
756 `notify-id` int(11) NOT NULL,
757 `master-parent-item` int(10) unsigned NOT NULL DEFAULT '0',
758 `parent-item` int(10) unsigned NOT NULL DEFAULT '0',
759 `receiver-uid` int(11) NOT NULL,
761 KEY `master-parent-item` (`master-parent-item`),
762 KEY `receiver-uid` (`receiver-uid`)
763 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
765 -- --------------------------------------------------------
768 -- Table structure for table `pconfig`
771 CREATE TABLE IF NOT EXISTS `pconfig` (
772 `id` int(11) NOT NULL AUTO_INCREMENT,
773 `uid` int(11) NOT NULL DEFAULT '0',
774 `cat` char(255) CHARACTER SET ascii NOT NULL,
775 `k` char(255) CHARACTER SET ascii NOT NULL,
776 `v` mediumtext NOT NULL,
778 UNIQUE KEY `access` (`uid`,`cat`,`k`)
779 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
781 -- --------------------------------------------------------
784 -- Table structure for table `photo`
787 CREATE TABLE IF NOT EXISTS `photo` (
788 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
789 `uid` int(10) unsigned NOT NULL,
790 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
791 `guid` char(64) NOT NULL,
792 `resource-id` char(255) NOT NULL,
793 `created` datetime NOT NULL,
794 `edited` datetime NOT NULL,
795 `title` char(255) NOT NULL,
796 `desc` text NOT NULL,
797 `album` char(255) NOT NULL,
798 `filename` char(255) NOT NULL,
799 `type` CHAR(128) NOT NULL DEFAULT 'image/jpeg',
800 `height` smallint(6) NOT NULL,
801 `width` smallint(6) NOT NULL,
802 `datasize` int(10) unsigned NOT NULL DEFAULT '0',
803 `data` mediumblob NOT NULL,
804 `scale` tinyint(3) NOT NULL,
805 `profile` tinyint(1) NOT NULL DEFAULT '0',
806 `allow_cid` mediumtext NOT NULL,
807 `allow_gid` mediumtext NOT NULL,
808 `deny_cid` mediumtext NOT NULL,
809 `deny_gid` mediumtext NOT NULL,
812 KEY `resource-id` (`resource-id`),
813 KEY `album` (`album`),
814 KEY `scale` (`scale`),
815 KEY `datasize` (`datasize`),
816 KEY `profile` (`profile`)
817 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
819 -- --------------------------------------------------------
822 -- Table structure for table `poll`
825 CREATE TABLE IF NOT EXISTS `poll` (
826 `id` int(11) NOT NULL AUTO_INCREMENT,
827 `uid` int(11) NOT NULL,
828 `q0` mediumtext NOT NULL,
829 `q1` mediumtext NOT NULL,
830 `q2` mediumtext NOT NULL,
831 `q3` mediumtext NOT NULL,
832 `q4` mediumtext NOT NULL,
833 `q5` mediumtext NOT NULL,
834 `q6` mediumtext NOT NULL,
835 `q7` mediumtext NOT NULL,
836 `q8` mediumtext NOT NULL,
837 `q9` mediumtext NOT NULL,
840 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
842 -- --------------------------------------------------------
845 -- Table structure for table `poll_result`
848 CREATE TABLE IF NOT EXISTS `poll_result` (
849 `id` int(11) NOT NULL AUTO_INCREMENT,
850 `poll_id` int(11) NOT NULL,
851 `choice` int(11) NOT NULL,
853 KEY `poll_id` (`poll_id`),
854 KEY `choice` (`choice`)
855 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
857 -- --------------------------------------------------------
860 -- Table structure for table `profile`
863 CREATE TABLE IF NOT EXISTS `profile` (
864 `id` int(11) NOT NULL AUTO_INCREMENT,
865 `uid` int(11) NOT NULL,
866 `profile-name` char(255) NOT NULL,
867 `is-default` tinyint(1) NOT NULL DEFAULT '0',
868 `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
869 `name` char(255) NOT NULL,
870 `pdesc` char(255) NOT NULL,
871 `dob` char(32) NOT NULL DEFAULT '0000-00-00',
872 `address` char(255) NOT NULL,
873 `locality` char(255) NOT NULL,
874 `region` char(255) NOT NULL,
875 `postal-code` char(32) NOT NULL,
876 `country-name` char(255) NOT NULL,
877 `hometown` char(255) NOT NULL,
878 `gender` char(32) NOT NULL,
879 `marital` char(255) NOT NULL,
880 `with` text NOT NULL,
881 `howlong` datetime NOT NULL default '0000-00-00 00:00:00',
882 `sexual` char(255) NOT NULL,
883 `politic` char(255) NOT NULL,
884 `religion` char(255) NOT NULL,
885 `pub_keywords` text NOT NULL,
886 `prv_keywords` text NOT NULL,
887 `likes` text NOT NULL,
888 `dislikes` text NOT NULL,
889 `about` text NOT NULL,
890 `summary` char(255) NOT NULL,
891 `music` text NOT NULL,
892 `book` text NOT NULL,
894 `film` text NOT NULL,
895 `interest` text NOT NULL,
896 `romance` text NOT NULL,
897 `work` text NOT NULL,
898 `education` text NOT NULL,
899 `contact` text NOT NULL,
900 `homepage` char(255) NOT NULL,
901 `photo` char(255) NOT NULL,
902 `thumb` char(255) NOT NULL,
903 `publish` tinyint(1) NOT NULL DEFAULT '0',
904 `net-publish` tinyint(1) NOT NULL DEFAULT '0',
906 FULLTEXT KEY `pub_keywords` (`pub_keywords`),
907 FULLTEXT KEY `prv_keywords` (`prv_keywords`)
908 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
910 -- --------------------------------------------------------
913 -- Table structure for table `profile_check`
916 CREATE TABLE IF NOT EXISTS `profile_check` (
917 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
918 `uid` int(10) unsigned NOT NULL,
919 `cid` int(10) unsigned NOT NULL DEFAULT '0',
920 `dfrn_id` char(255) NOT NULL,
921 `sec` char(255) NOT NULL,
922 `expire` int(11) NOT NULL,
924 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
926 -- --------------------------------------------------------
929 -- Table structure for table `queue`
932 CREATE TABLE IF NOT EXISTS `queue` (
933 `id` int(11) NOT NULL AUTO_INCREMENT,
934 `cid` int(11) NOT NULL,
935 `network` char(32) NOT NULL,
936 `created` datetime NOT NULL,
937 `last` datetime NOT NULL,
938 `content` mediumtext NOT NULL,
939 `batch` tinyint(1) NOT NULL DEFAULT '0',
942 KEY `network` (`network`),
943 KEY `created` (`created`),
945 KEY `batch` (`batch`)
946 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
948 -- --------------------------------------------------------
951 -- Table structure for table `register`
954 CREATE TABLE IF NOT EXISTS `register` (
955 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
956 `hash` char(255) NOT NULL,
957 `created` datetime NOT NULL,
958 `uid` int(10) unsigned NOT NULL,
959 `password` char(255) NOT NULL,
960 `language` char(16) NOT NULL,
962 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
964 -- --------------------------------------------------------
967 -- Table structure for table `search`
970 CREATE TABLE IF NOT EXISTS `search` (
971 `id` int(11) NOT NULL AUTO_INCREMENT,
972 `uid` int(11) NOT NULL,
973 `term` char(255) NOT NULL,
977 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
979 -- --------------------------------------------------------
982 -- Table structure for table `session`
985 CREATE TABLE IF NOT EXISTS `session` (
986 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
987 `sid` char(255) NOT NULL,
988 `data` text NOT NULL,
989 `expire` int(10) unsigned NOT NULL,
992 KEY `expire` (`expire`)
993 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
995 -- --------------------------------------------------------
998 -- Table structure for table `sign`
1001 CREATE TABLE IF NOT EXISTS `sign` (
1002 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1003 `iid` int(10) unsigned NOT NULL DEFAULT '0',
1004 `retract_iid` int(10) unsigned NOT NULL DEFAULT '0',
1005 `signed_text` mediumtext NOT NULL,
1006 `signature` text NOT NULL,
1007 `signer` char(255) NOT NULL,
1010 KEY `retract_iid` (`retract_iid`)
1011 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1013 -- --------------------------------------------------------
1016 -- Table structure for table `spam`
1019 CREATE TABLE IF NOT EXISTS `spam` (
1020 `id` int(11) NOT NULL AUTO_INCREMENT,
1021 `uid` int(11) NOT NULL,
1022 `spam` int(11) NOT NULL DEFAULT '0',
1023 `ham` int(11) NOT NULL DEFAULT '0',
1024 `term` char(255) NOT NULL,
1025 `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1028 KEY `spam` (`spam`),
1031 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1033 -- --------------------------------------------------------
1036 -- Table structure for table `term`
1039 CREATE TABLE IF NOT EXISTS `term` (
1040 `tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
1041 `aid` int(10) unsigned NOT NULL DEFAULT '0',
1042 `uid` int(10) unsigned NOT NULL DEFAULT '0',
1043 `oid` int(10) unsigned NOT NULL,
1044 `otype` tinyint(3) unsigned NOT NULL,
1045 `type` tinyint(3) unsigned NOT NULL,
1046 `term` char(255) NOT NULL,
1047 `url` char(255) NOT NULL,
1048 PRIMARY KEY (`tid`),
1050 KEY `otype` (`otype`),
1051 KEY `type` (`type`),
1052 KEY `term` (`term`),
1055 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1057 -- --------------------------------------------------------
1060 -- Table structure for table `tokens`
1063 CREATE TABLE IF NOT EXISTS `tokens` (
1064 `id` varchar(40) NOT NULL,
1065 `secret` text NOT NULL,
1066 `client_id` varchar(20) NOT NULL,
1067 `expires` int(11) NOT NULL,
1068 `scope` varchar(200) NOT NULL,
1069 `uid` int(11) NOT NULL,
1071 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1073 -- --------------------------------------------------------
1076 -- Table structure for table `user`
1079 CREATE TABLE IF NOT EXISTS `user` (
1080 `uid` int(11) NOT NULL AUTO_INCREMENT,
1081 `guid` char(16) NOT NULL,
1082 `username` char(255) NOT NULL,
1083 `password` char(255) NOT NULL,
1084 `nickname` char(255) NOT NULL,
1085 `email` char(255) NOT NULL,
1086 `openid` char(255) NOT NULL,
1087 `timezone` char(128) NOT NULL,
1088 `language` char(16) NOT NULL DEFAULT 'en',
1089 `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1090 `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1091 `default-location` char(255) NOT NULL,
1092 `allow_location` tinyint(1) NOT NULL DEFAULT '0',
1093 `theme` char(255) NOT NULL,
1094 `pubkey` text NOT NULL,
1095 `prvkey` text NOT NULL,
1096 `spubkey` text NOT NULL,
1097 `sprvkey` text NOT NULL,
1098 `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
1099 `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
1100 `blockwall` tinyint(1) NOT NULL DEFAULT '0',
1101 `hidewall` tinyint(1) NOT NULL DEFAULT '0',
1102 `blocktags` tinyint(1) NOT NULL DEFAULT '0',
1103 `unkmail` tinyint(1) NOT NULL DEFAULT '0',
1104 `cntunkmail` int(11) NOT NULL DEFAULT '10',
1105 `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
1106 `page-flags` int(11) NOT NULL DEFAULT '0',
1107 `prvnets` tinyint(1) NOT NULL DEFAULT '0',
1108 `pwdreset` char(255) NOT NULL,
1109 `maxreq` int(11) NOT NULL DEFAULT '10',
1110 `expire` int(10) unsigned NOT NULL DEFAULT '0',
1111 `account_removed` tinyint(1) NOT NULL DEFAULT '0',
1112 `account_expired` tinyint(1) NOT NULL DEFAULT '0',
1113 `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1114 `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1115 `service_class` char(32) NOT NULL,
1116 `def_gid` int(11) NOT NULL DEFAULT '0',
1117 `allow_cid` mediumtext NOT NULL,
1118 `allow_gid` mediumtext NOT NULL,
1119 `deny_cid` mediumtext NOT NULL,
1120 `deny_gid` mediumtext NOT NULL,
1121 `openidserver` text NOT NULL,
1122 PRIMARY KEY (`uid`),
1123 KEY `nickname` (`nickname`),
1124 KEY `login_date` (`login_date`),
1125 KEY `account_expired` (`account_expired`),
1126 KEY `hidewall` (`hidewall`),
1127 KEY `blockwall` (`blockwall`),
1128 KEY `blocked` (`blocked`),
1129 KEY `verified` (`verified`),
1130 KEY `unkmail` (`unkmail`),
1131 KEY `cntunkmail` (`cntunkmail`),
1132 KEY `account_removed` (`account_removed`),
1133 KEY `service_class` (`service_class`)
1134 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1136 -- --------------------------------------------------------
1139 -- Table structure for table `userd`
1142 CREATE TABLE IF NOT EXISTS `userd` (
1143 `id` int(11) NOT NULL AUTO_INCREMENT,
1144 `username` char(255) NOT NULL,
1146 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1148 -- --------------------------------------------------------
1151 -- Table structure for table `tag`
1154 CREATE TABLE IF NOT EXISTS `tag` (
1155 `iid` int(11) NOT NULL,
1156 `tag` char(255) NOT NULL,
1157 `link` char(255) NOT NULL,
1158 PRIMARY KEY (`iid`, `tag`),
1160 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1162 -- --------------------------------------------------------
1165 -- Table structure for table `push_subscriber`
1168 CREATE TABLE IF NOT EXISTS `push_subscriber` (
1169 `id` int(11) NOT NULL AUTO_INCREMENT,
1170 `uid` int(11) NOT NULL,
1171 `callback_url` char(255) NOT NULL,
1172 `topic` char(255) NOT NULL,
1173 `nickname` char(255) NOT NULL,
1174 `push` int(11) NOT NULL,
1175 `last_update` datetime NOT NULL,
1176 `secret` char(255) NOT NULL,
1178 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1180 -- --------------------------------------------------------
1183 -- Table structure for table `unique_contacts`
1186 CREATE TABLE IF NOT EXISTS `unique_contacts` (
1187 `id` INT NOT NULL AUTO_INCREMENT,
1188 `url` CHAR(255) NOT NULL,
1189 `nick` CHAR(255) NOT NULL,
1190 `name` CHAR(255) NOT NULL,
1191 `avatar` CHAR(255) NOT NULL,
1194 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1196 -- --------------------------------------------------------
1199 -- Table structure for table `thread`
1202 CREATE TABLE IF NOT EXISTS `thread` (
1203 `iid` int(10) unsigned NOT NULL DEFAULT '0',
1204 `uid` int(10) unsigned NOT NULL DEFAULT '0',
1205 `contact-id` int(11) unsigned NOT NULL DEFAULT '0',
1206 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1207 `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1208 `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1209 `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1210 `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1211 `wall` tinyint(1) NOT NULL DEFAULT '0',
1212 `private` tinyint(1) NOT NULL DEFAULT '0',
1213 `pubmail` tinyint(1) NOT NULL DEFAULT '0',
1214 `moderated` tinyint(1) NOT NULL DEFAULT '0',
1215 `visible` tinyint(1) NOT NULL DEFAULT '0',
1216 `spam` tinyint(1) NOT NULL DEFAULT '0',
1217 `starred` tinyint(1) NOT NULL DEFAULT '0',
1218 `bookmark` tinyint(1) NOT NULL DEFAULT '0',
1219 `unseen` tinyint(1) NOT NULL DEFAULT '1',
1220 `deleted` tinyint(1) NOT NULL DEFAULT '0',
1221 `origin` tinyint(1) NOT NULL DEFAULT '0',
1222 `forum_mode` tinyint(1) NOT NULL DEFAULT '0',
1223 `mention` tinyint(1) NOT NULL DEFAULT '0',
1224 `network` char(32) NOT NULL,
1225 PRIMARY KEY (`iid`),
1226 KEY `created` (`created`),
1227 KEY `commented` (`commented`),
1228 KEY `uid_network_commented` (`uid`,`network`,`commented`),
1229 KEY `uid_network_created` (`uid`,`network`,`created`),
1230 KEY `uid_contactid_commented` (`uid`,`contact-id`,`commented`),
1231 KEY `uid_contactid_created` (`uid`,`contact-id`,`created`),
1232 KEY `wall_private_received` (`wall`,`private`,`received`),
1233 KEY `uid_created` (`uid`,`created`),
1234 KEY `uid_commented` (`uid`,`commented`)
1235 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;