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',
190 KEY `issued-id` (`issued-id`),
191 KEY `dfrn-id` (`dfrn-id`),
192 KEY `blocked` (`blocked`),
193 KEY `readonly` (`readonly`),
194 KEY `network` (`network`),
197 KEY `attag` (`attag`),
200 KEY `batch` (`batch`),
202 KEY `pending` (`pending`),
203 KEY `hidden` (`hidden`),
204 KEY `archive` (`archive`),
205 KEY `forum` (`forum`)
206 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
208 -- --------------------------------------------------------
211 -- Table structure for table `conv`
214 CREATE TABLE IF NOT EXISTS `conv` (
215 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
216 `guid` char(64) NOT NULL,
217 `recips` mediumtext NOT NULL,
218 `uid` int(11) NOT NULL,
219 `creator` char(255) NOT NULL,
220 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
221 `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
222 `subject` mediumtext NOT NULL,
224 KEY `created` (`created`),
225 KEY `updated` (`updated`)
226 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
228 -- --------------------------------------------------------
231 -- Table structure for table `deliverq`
234 CREATE TABLE IF NOT EXISTS `deliverq` (
235 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
236 `cmd` char(32) NOT NULL,
237 `item` int(11) NOT NULL,
238 `contact` int(11) NOT NULL,
240 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
242 -- --------------------------------------------------------
245 -- Table structure for table `event`
248 CREATE TABLE IF NOT EXISTS `event` (
249 `id` int(11) NOT NULL AUTO_INCREMENT,
250 `uid` int(11) NOT NULL,
251 `cid` int(11) NOT NULL,
252 `uri` char(255) NOT NULL,
253 `created` datetime NOT NULL,
254 `edited` datetime NOT NULL,
255 `start` datetime NOT NULL,
256 `finish` datetime NOT NULL,
257 `summary` text NOT NULL,
258 `desc` text NOT NULL,
259 `location` text NOT NULL,
260 `type` char(255) NOT NULL,
261 `nofinish` tinyint(1) NOT NULL DEFAULT '0',
262 `adjust` tinyint(1) NOT NULL DEFAULT '1',
263 `ignore` tinyint(1) NOT NULL DEFAULT '0',
264 `allow_cid` mediumtext NOT NULL,
265 `allow_gid` mediumtext NOT NULL,
266 `deny_cid` mediumtext NOT NULL,
267 `deny_gid` mediumtext NOT NULL,
272 KEY `type` ( `type` ),
273 KEY `start` ( `start` ),
274 KEY `finish` ( `finish` ),
275 KEY `adjust` ( `adjust` ),
276 KEY `ignore` ( `ignore` )
277 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
279 -- --------------------------------------------------------
282 -- Table structure for table `fcontact`
285 CREATE TABLE IF NOT EXISTS `fcontact` (
286 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
287 `url` char(255) NOT NULL,
288 `name` char(255) NOT NULL,
289 `photo` char(255) NOT NULL,
290 `request` char(255) NOT NULL,
291 `nick` char(255) NOT NULL,
292 `addr` char(255) NOT NULL,
293 `batch` char(255) NOT NULL,
294 `notify` char(255) NOT NULL,
295 `poll` char(255) NOT NULL,
296 `confirm` char(255) NOT NULL,
297 `priority` tinyint(1) NOT NULL,
298 `network` char(32) NOT NULL,
299 `alias` char(255) NOT NULL,
300 `pubkey` text NOT NULL,
301 `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
304 KEY `network` (`network`)
305 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
307 -- --------------------------------------------------------
310 -- Table structure for table `ffinder`
313 CREATE TABLE IF NOT EXISTS `ffinder` (
314 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
315 `uid` int(10) unsigned NOT NULL,
316 `cid` int(10) unsigned NOT NULL,
317 `fid` int(10) unsigned NOT NULL,
319 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
321 -- --------------------------------------------------------
324 -- Table structure for table `fserver`
327 CREATE TABLE IF NOT EXISTS `fserver` (
328 `id` int(11) NOT NULL AUTO_INCREMENT,
329 `server` char(255) NOT NULL,
330 `posturl` char(255) NOT NULL,
333 KEY `server` (`server`)
334 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
336 -- --------------------------------------------------------
339 -- Table structure for table `fsuggest`
342 CREATE TABLE IF NOT EXISTS `fsuggest` (
343 `id` int(11) NOT NULL AUTO_INCREMENT,
344 `uid` int(11) NOT NULL,
345 `cid` int(11) NOT NULL,
346 `name` char(255) NOT NULL,
347 `url` char(255) NOT NULL,
348 `request` char(255) NOT NULL,
349 `photo` char(255) NOT NULL,
350 `note` text NOT NULL,
351 `created` datetime NOT NULL,
353 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
355 -- --------------------------------------------------------
358 -- Table structure for table `gcign`
361 CREATE TABLE IF NOT EXISTS `gcign` (
362 `id` int(11) NOT NULL AUTO_INCREMENT,
363 `uid` int(11) NOT NULL,
364 `gcid` int(11) NOT NULL,
368 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
370 -- --------------------------------------------------------
373 -- Table structure for table `gcontact`
376 CREATE TABLE IF NOT EXISTS `gcontact` (
377 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
378 `name` char(255) NOT NULL,
379 `url` char(255) NOT NULL,
380 `nurl` char(255) NOT NULL,
381 `photo` char(255) NOT NULL,
382 `connect` char(255) NOT NULL,
385 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
387 -- --------------------------------------------------------
390 -- Table structure for table `glink`
393 CREATE TABLE IF NOT EXISTS `glink` (
394 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
395 `cid` int(11) NOT NULL,
396 `uid` int(11) NOT NULL,
397 `gcid` int(11) NOT NULL,
398 `zcid` int(11) NOT NULL,
399 `updated` datetime NOT NULL,
405 KEY `updated` (`updated`)
406 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
408 -- --------------------------------------------------------
411 -- Table structure for table `group`
414 CREATE TABLE IF NOT EXISTS `group` (
415 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
416 `uid` int(10) unsigned NOT NULL,
417 `visible` tinyint(1) NOT NULL DEFAULT '0',
418 `deleted` tinyint(1) NOT NULL DEFAULT '0',
419 `name` char(255) NOT NULL,
421 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
423 -- --------------------------------------------------------
426 -- Table structure for table `group_member`
429 CREATE TABLE IF NOT EXISTS `group_member` (
430 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
431 `uid` int(10) unsigned NOT NULL,
432 `gid` int(10) unsigned NOT NULL,
433 `contact-id` int(10) unsigned NOT NULL,
435 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
437 -- --------------------------------------------------------
440 -- Table structure for table `guid`
443 CREATE TABLE IF NOT EXISTS `guid` (
444 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
445 `guid` char(64) NOT NULL,
448 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
450 -- --------------------------------------------------------
453 -- Table structure for table `hook`
456 CREATE TABLE IF NOT EXISTS `hook` (
457 `id` int(11) NOT NULL AUTO_INCREMENT,
458 `hook` char(255) NOT NULL,
459 `file` char(255) NOT NULL,
460 `function` char(255) NOT NULL,
461 `priority` int(11) UNSIGNED NOT NULL DEFAULT '0',
463 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
465 -- --------------------------------------------------------
468 -- Table structure for table `intro`
471 CREATE TABLE IF NOT EXISTS `intro` (
472 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
473 `uid` int(10) unsigned NOT NULL,
474 `fid` int(11) NOT NULL DEFAULT '0',
475 `contact-id` int(11) NOT NULL,
476 `knowyou` tinyint(1) NOT NULL,
477 `duplex` tinyint(1) NOT NULL DEFAULT '0',
478 `note` text NOT NULL,
479 `hash` char(255) NOT NULL,
480 `datetime` datetime NOT NULL,
481 `blocked` tinyint(1) NOT NULL DEFAULT '1',
482 `ignore` tinyint(1) NOT NULL DEFAULT '0',
484 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
486 -- --------------------------------------------------------
489 -- Table structure for table `item`
492 CREATE TABLE IF NOT EXISTS `item` (
493 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
494 `guid` char(64) NOT NULL,
495 `uri` char(255) CHARACTER SET ascii NOT NULL,
496 `uid` int(10) unsigned NOT NULL DEFAULT '0',
497 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
498 `type` char(255) NOT NULL,
499 `wall` tinyint(1) NOT NULL DEFAULT '0',
500 `gravity` tinyint(1) NOT NULL DEFAULT '0',
501 `parent` int(10) unsigned NOT NULL DEFAULT '0',
502 `parent-uri` char(255) CHARACTER SET ascii NOT NULL,
503 `extid` char(255) NOT NULL,
504 `thr-parent` char(255) NOT NULL,
505 `created` datetime NOT NULL,
506 `edited` datetime NOT NULL,
507 `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
508 `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
509 `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
510 `owner-name` char(255) NOT NULL,
511 `owner-link` char(255) NOT NULL,
512 `owner-avatar` char(255) NOT NULL,
513 `author-name` char(255) NOT NULL,
514 `author-link` char(255) NOT NULL,
515 `author-avatar` char(255) NOT NULL,
516 `title` char(255) NOT NULL,
517 `body` mediumtext NOT NULL,
518 `app` char(255) NOT NULL,
519 `verb` char(255) NOT NULL,
520 `object-type` char(255) NOT NULL,
521 `object` text NOT NULL,
522 `target-type` char(255) NOT NULL,
523 `target` text NOT NULL,
524 `postopts` text NOT NULL,
525 `plink` char(255) NOT NULL,
526 `resource-id` char(255) NOT NULL,
527 `event-id` int(11) NOT NULL,
528 `tag` mediumtext NOT NULL,
529 `attach` mediumtext NOT NULL,
530 `inform` mediumtext NOT NULL,
531 `file` mediumtext NOT NULL,
532 `location` char(255) NOT NULL,
533 `coord` char(255) NOT NULL,
534 `allow_cid` mediumtext NOT NULL,
535 `allow_gid` mediumtext NOT NULL,
536 `deny_cid` mediumtext NOT NULL,
537 `deny_gid` mediumtext NOT NULL,
538 `private` tinyint(1) NOT NULL DEFAULT '0',
539 `pubmail` tinyint(1) NOT NULL DEFAULT '0',
540 `moderated` tinyint(1) NOT NULL DEFAULT '0',
541 `visible` tinyint(1) NOT NULL DEFAULT '0',
542 `spam` tinyint(1) NOT NULL DEFAULT '0',
543 `starred` tinyint(1) NOT NULL DEFAULT '0',
544 `bookmark` tinyint(1) NOT NULL DEFAULT '0',
545 `unseen` tinyint(1) NOT NULL DEFAULT '1',
546 `deleted` tinyint(1) NOT NULL DEFAULT '0',
547 `origin` tinyint(1) NOT NULL DEFAULT '0',
548 `forum_mode` tinyint(1) NOT NULL DEFAULT '0',
549 `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
553 KEY `contact-id` (`contact-id`),
555 KEY `parent` (`parent`),
556 KEY `parent-uri` (`parent-uri`),
557 KEY `created` (`created`),
558 KEY `edited` (`edited`),
559 KEY `visible` (`visible`),
560 KEY `deleted` (`deleted`),
561 KEY `last-child` (`last-child`),
562 KEY `unseen` (`unseen`),
563 KEY `extid` (`extid`),
564 KEY `received` (`received`),
565 KEY `starred` (`starred`),
567 KEY `origin` (`origin`),
569 KEY `forum_mode` (`forum_mode`),
570 KEY `author-link` (`author-link`),
571 KEY `bookmark` (`bookmark`),
572 KEY `moderated` (`moderated`),
574 KEY `author-name` (`author-name`),
575 KEY `uid_commented` (`uid`, `commented`),
576 KEY `uid_created` (`uid`, `created`),
577 KEY `uid_unseen` (`uid`, `unseen`),
578 FULLTEXT KEY `title` (`title`),
579 FULLTEXT KEY `body` (`body`),
580 FULLTEXT KEY `allow_cid` (`allow_cid`),
581 FULLTEXT KEY `allow_gid` (`allow_gid`),
582 FULLTEXT KEY `deny_cid` (`deny_cid`),
583 FULLTEXT KEY `deny_gid` (`deny_gid`),
584 FULLTEXT KEY `tag` (`tag`),
585 FULLTEXT KEY `file` (`file`)
586 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
588 -- --------------------------------------------------------
591 -- Table structure for table `item_id`
594 CREATE TABLE IF NOT EXISTS `item_id` (
595 `id` int(11) NOT NULL AUTO_INCREMENT,
596 `iid` int(11) NOT NULL,
597 `uid` int(11) NOT NULL,
598 `sid` char(255) NOT NULL,
599 `service` char(255) NOT NULL,
604 KEY `service` (`service`)
605 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
607 -- --------------------------------------------------------
610 -- Table structure for table `locks`
613 CREATE TABLE IF NOT EXISTS `locks` (
614 `id` int(11) NOT NULL AUTO_INCREMENT,
615 `name` char(128) NOT NULL,
616 `locked` tinyint(1) NOT NULL DEFAULT '0',
618 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
620 -- --------------------------------------------------------
623 -- Table structure for table `mail`
626 CREATE TABLE IF NOT EXISTS `mail` (
627 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
628 `uid` int(10) unsigned NOT NULL,
629 `guid` char(64) NOT NULL,
630 `from-name` char(255) NOT NULL,
631 `from-photo` char(255) NOT NULL,
632 `from-url` char(255) NOT NULL,
633 `contact-id` char(255) NOT NULL,
634 `convid` int(11) NOT NULL,
635 `title` char(255) NOT NULL,
636 `body` mediumtext NOT NULL,
637 `seen` tinyint(1) NOT NULL,
638 `reply` tinyint(1) NOT NULL DEFAULT '0',
639 `replied` tinyint(1) NOT NULL,
640 `unknown` tinyint(1) NOT NULL DEFAULT '0',
641 `uri` char(255) NOT NULL,
642 `parent-uri` char(255) NOT NULL,
643 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
645 KEY `reply` (`reply`),
650 KEY `parent-uri` (`parent-uri`),
651 KEY `created` (`created`),
652 KEY `convid` (`convid`),
653 KEY `unknown` (`unknown`)
654 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
656 -- --------------------------------------------------------
659 -- Table structure for table `mailacct`
662 CREATE TABLE IF NOT EXISTS `mailacct` (
663 `id` int(11) NOT NULL AUTO_INCREMENT,
664 `uid` int(11) NOT NULL,
665 `server` char(255) NOT NULL,
666 `port` int(11) NOT NULL,
667 `ssltype` char(16) NOT NULL,
668 `mailbox` char(255) NOT NULL,
669 `user` char(255) NOT NULL,
670 `pass` text NOT NULL,
671 `action` int(11) NOT NULL,
672 `movetofolder` char(255) NOT NULL,
673 `reply_to` char(255) NOT NULL,
674 `pubmail` tinyint(1) NOT NULL DEFAULT '0',
675 `last_check` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
677 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
679 -- --------------------------------------------------------
682 -- Table structure for table `manage`
685 CREATE TABLE IF NOT EXISTS `manage` (
686 `id` int(11) NOT NULL AUTO_INCREMENT,
687 `uid` int(11) NOT NULL,
688 `mid` int(11) NOT NULL,
692 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
694 -- --------------------------------------------------------
697 -- Table structure for table `notify`
700 CREATE TABLE IF NOT EXISTS `notify` (
701 `id` int(11) NOT NULL AUTO_INCREMENT,
702 `hash` char(64) NOT NULL,
703 `name` char(255) NOT NULL,
704 `url` char(255) NOT NULL,
705 `photo` char(255) NOT NULL,
706 `date` datetime NOT NULL,
707 `msg` mediumtext NOT NULL,
708 `uid` int(11) NOT NULL,
709 `link` char(255) NOT NULL,
710 `parent` int(11) NOT NULL,
711 `seen` tinyint(1) NOT NULL DEFAULT '0',
712 `type` int(11) NOT NULL,
713 `verb` char(255) NOT NULL,
714 `otype` char(16) NOT NULL,
721 KEY `parent` (`parent`),
723 KEY `otype` (`otype`)
724 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
726 -- --------------------------------------------------------
729 -- Table structure for table `notify-threads`
732 CREATE TABLE IF NOT EXISTS `notify-threads` (
733 `id` int(11) NOT NULL AUTO_INCREMENT,
734 `notify-id` int(11) NOT NULL,
735 `master-parent-item` int(10) unsigned NOT NULL DEFAULT '0',
736 `parent-item` int(10) unsigned NOT NULL DEFAULT '0',
737 `receiver-uid` int(11) NOT NULL,
739 KEY `master-parent-item` (`master-parent-item`),
740 KEY `receiver-uid` (`receiver-uid`)
741 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
743 -- --------------------------------------------------------
746 -- Table structure for table `pconfig`
749 CREATE TABLE IF NOT EXISTS `pconfig` (
750 `id` int(11) NOT NULL AUTO_INCREMENT,
751 `uid` int(11) NOT NULL DEFAULT '0',
752 `cat` char(255) CHARACTER SET ascii NOT NULL,
753 `k` char(255) CHARACTER SET ascii NOT NULL,
754 `v` mediumtext NOT NULL,
756 UNIQUE KEY `access` (`uid`,`cat`,`k`)
757 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
759 -- --------------------------------------------------------
762 -- Table structure for table `photo`
765 CREATE TABLE IF NOT EXISTS `photo` (
766 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
767 `uid` int(10) unsigned NOT NULL,
768 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
769 `guid` char(64) NOT NULL,
770 `resource-id` char(255) NOT NULL,
771 `created` datetime NOT NULL,
772 `edited` datetime NOT NULL,
773 `title` char(255) NOT NULL,
774 `desc` text NOT NULL,
775 `album` char(255) NOT NULL,
776 `filename` char(255) NOT NULL,
777 `type` CHAR(128) NOT NULL DEFAULT 'image/jpeg',
778 `height` smallint(6) NOT NULL,
779 `width` smallint(6) NOT NULL,
780 `data` mediumblob NOT NULL,
781 `scale` tinyint(3) NOT NULL,
782 `profile` tinyint(1) NOT NULL DEFAULT '0',
783 `allow_cid` mediumtext NOT NULL,
784 `allow_gid` mediumtext NOT NULL,
785 `deny_cid` mediumtext NOT NULL,
786 `deny_gid` mediumtext NOT NULL,
789 KEY `resource-id` (`resource-id`),
790 KEY `album` (`album`),
791 KEY `scale` (`scale`),
792 KEY `profile` (`profile`)
793 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
795 -- --------------------------------------------------------
798 -- Table structure for table `poll`
801 CREATE TABLE IF NOT EXISTS `poll` (
802 `id` int(11) NOT NULL AUTO_INCREMENT,
803 `uid` int(11) NOT NULL,
804 `q0` mediumtext NOT NULL,
805 `q1` mediumtext NOT NULL,
806 `q2` mediumtext NOT NULL,
807 `q3` mediumtext NOT NULL,
808 `q4` mediumtext NOT NULL,
809 `q5` mediumtext NOT NULL,
810 `q6` mediumtext NOT NULL,
811 `q7` mediumtext NOT NULL,
812 `q8` mediumtext NOT NULL,
813 `q9` mediumtext NOT NULL,
816 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
818 -- --------------------------------------------------------
821 -- Table structure for table `poll_result`
824 CREATE TABLE IF NOT EXISTS `poll_result` (
825 `id` int(11) NOT NULL AUTO_INCREMENT,
826 `poll_id` int(11) NOT NULL,
827 `choice` int(11) NOT NULL,
829 KEY `poll_id` (`poll_id`),
830 KEY `choice` (`choice`)
831 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
833 -- --------------------------------------------------------
836 -- Table structure for table `profile`
839 CREATE TABLE IF NOT EXISTS `profile` (
840 `id` int(11) NOT NULL AUTO_INCREMENT,
841 `uid` int(11) NOT NULL,
842 `profile-name` char(255) NOT NULL,
843 `is-default` tinyint(1) NOT NULL DEFAULT '0',
844 `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
845 `name` char(255) NOT NULL,
846 `pdesc` char(255) NOT NULL,
847 `dob` char(32) NOT NULL DEFAULT '0000-00-00',
848 `address` char(255) NOT NULL,
849 `locality` char(255) NOT NULL,
850 `region` char(255) NOT NULL,
851 `postal-code` char(32) NOT NULL,
852 `country-name` char(255) NOT NULL,
853 `hometown` char(255) NOT NULL,
854 `gender` char(32) NOT NULL,
855 `marital` char(255) NOT NULL,
856 `with` text NOT NULL,
857 `howlong` datetime NOT NULL default '0000-00-00 00:00:00',
858 `sexual` char(255) NOT NULL,
859 `politic` char(255) NOT NULL,
860 `religion` char(255) NOT NULL,
861 `pub_keywords` text NOT NULL,
862 `prv_keywords` text NOT NULL,
863 `likes` text NOT NULL,
864 `dislikes` text NOT NULL,
865 `about` text NOT NULL,
866 `summary` char(255) NOT NULL,
867 `music` text NOT NULL,
868 `book` text NOT NULL,
870 `film` text NOT NULL,
871 `interest` text NOT NULL,
872 `romance` text NOT NULL,
873 `work` text NOT NULL,
874 `education` text NOT NULL,
875 `contact` text NOT NULL,
876 `homepage` char(255) NOT NULL,
877 `photo` char(255) NOT NULL,
878 `thumb` char(255) NOT NULL,
879 `publish` tinyint(1) NOT NULL DEFAULT '0',
880 `net-publish` tinyint(1) NOT NULL DEFAULT '0',
882 FULLTEXT KEY `pub_keywords` (`pub_keywords`),
883 FULLTEXT KEY `prv_keywords` (`prv_keywords`)
884 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
886 -- --------------------------------------------------------
889 -- Table structure for table `profile_check`
892 CREATE TABLE IF NOT EXISTS `profile_check` (
893 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
894 `uid` int(10) unsigned NOT NULL,
895 `cid` int(10) unsigned NOT NULL DEFAULT '0',
896 `dfrn_id` char(255) NOT NULL,
897 `sec` char(255) NOT NULL,
898 `expire` int(11) NOT NULL,
900 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
902 -- --------------------------------------------------------
905 -- Table structure for table `queue`
908 CREATE TABLE IF NOT EXISTS `queue` (
909 `id` int(11) NOT NULL AUTO_INCREMENT,
910 `cid` int(11) NOT NULL,
911 `network` char(32) NOT NULL,
912 `created` datetime NOT NULL,
913 `last` datetime NOT NULL,
914 `content` mediumtext NOT NULL,
915 `batch` tinyint(1) NOT NULL DEFAULT '0',
918 KEY `network` (`network`),
919 KEY `created` (`created`),
921 KEY `batch` (`batch`)
922 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
924 -- --------------------------------------------------------
927 -- Table structure for table `register`
930 CREATE TABLE IF NOT EXISTS `register` (
931 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
932 `hash` char(255) NOT NULL,
933 `created` datetime NOT NULL,
934 `uid` int(10) unsigned NOT NULL,
935 `password` char(255) NOT NULL,
936 `language` char(16) NOT NULL,
938 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
940 -- --------------------------------------------------------
943 -- Table structure for table `search`
946 CREATE TABLE IF NOT EXISTS `search` (
947 `id` int(11) NOT NULL AUTO_INCREMENT,
948 `uid` int(11) NOT NULL,
949 `term` char(255) NOT NULL,
953 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
955 -- --------------------------------------------------------
958 -- Table structure for table `session`
961 CREATE TABLE IF NOT EXISTS `session` (
962 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
963 `sid` char(255) NOT NULL,
964 `data` text NOT NULL,
965 `expire` int(10) unsigned NOT NULL,
968 KEY `expire` (`expire`)
969 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
971 -- --------------------------------------------------------
974 -- Table structure for table `sign`
977 CREATE TABLE IF NOT EXISTS `sign` (
978 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
979 `iid` int(10) unsigned NOT NULL DEFAULT '0',
980 `retract_iid` int(10) unsigned NOT NULL DEFAULT '0',
981 `signed_text` mediumtext NOT NULL,
982 `signature` text NOT NULL,
983 `signer` char(255) NOT NULL,
986 KEY `retract_iid` (`retract_iid`)
987 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
989 -- --------------------------------------------------------
992 -- Table structure for table `spam`
995 CREATE TABLE IF NOT EXISTS `spam` (
996 `id` int(11) NOT NULL AUTO_INCREMENT,
997 `uid` int(11) NOT NULL,
998 `spam` int(11) NOT NULL DEFAULT '0',
999 `ham` int(11) NOT NULL DEFAULT '0',
1000 `term` char(255) NOT NULL,
1001 `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1004 KEY `spam` (`spam`),
1007 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1009 -- --------------------------------------------------------
1012 -- Table structure for table `term`
1015 CREATE TABLE IF NOT EXISTS `term` (
1016 `tid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
1017 `oid` INT UNSIGNED NOT NULL ,
1018 `otype` TINYINT( 3 ) UNSIGNED NOT NULL ,
1019 `type` TINYINT( 3 ) UNSIGNED NOT NULL ,
1020 `term` CHAR( 255 ) NOT NULL ,
1021 `url` CHAR( 255 ) NOT NULL,
1022 PRIMARY KEY (`tid`),
1023 KEY `oid` ( `oid` ),
1024 KEY `otype` ( `otype` ),
1025 KEY `type` ( `type` ),
1026 KEY `term` ( `term` )
1027 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1029 -- --------------------------------------------------------
1032 -- Table structure for table `tokens`
1035 CREATE TABLE IF NOT EXISTS `tokens` (
1036 `id` varchar(40) NOT NULL,
1037 `secret` text NOT NULL,
1038 `client_id` varchar(20) NOT NULL,
1039 `expires` int(11) NOT NULL,
1040 `scope` varchar(200) NOT NULL,
1041 `uid` int(11) NOT NULL,
1043 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1045 -- --------------------------------------------------------
1048 -- Table structure for table `user`
1051 CREATE TABLE IF NOT EXISTS `user` (
1052 `uid` int(11) NOT NULL AUTO_INCREMENT,
1053 `guid` char(16) NOT NULL,
1054 `username` char(255) NOT NULL,
1055 `password` char(255) NOT NULL,
1056 `nickname` char(255) NOT NULL,
1057 `email` char(255) NOT NULL,
1058 `openid` char(255) NOT NULL,
1059 `timezone` char(128) NOT NULL,
1060 `language` char(16) NOT NULL DEFAULT 'en',
1061 `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1062 `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1063 `default-location` char(255) NOT NULL,
1064 `allow_location` tinyint(1) NOT NULL DEFAULT '0',
1065 `theme` char(255) NOT NULL,
1066 `pubkey` text NOT NULL,
1067 `prvkey` text NOT NULL,
1068 `spubkey` text NOT NULL,
1069 `sprvkey` text NOT NULL,
1070 `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
1071 `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
1072 `blockwall` tinyint(1) NOT NULL DEFAULT '0',
1073 `hidewall` tinyint(1) NOT NULL DEFAULT '0',
1074 `blocktags` tinyint(1) NOT NULL DEFAULT '0',
1075 `unkmail` tinyint(1) NOT NULL DEFAULT '0',
1076 `cntunkmail` int(11) NOT NULL DEFAULT '10',
1077 `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
1078 `page-flags` int(11) NOT NULL DEFAULT '0',
1079 `prvnets` tinyint(1) NOT NULL DEFAULT '0',
1080 `pwdreset` char(255) NOT NULL,
1081 `maxreq` int(11) NOT NULL DEFAULT '10',
1082 `expire` int(10) unsigned NOT NULL DEFAULT '0',
1083 `account_removed` tinyint(1) NOT NULL DEFAULT '0',
1084 `account_expired` tinyint(1) NOT NULL DEFAULT '0',
1085 `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1086 `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1087 `service_class` char(32) NOT NULL,
1088 `def_gid` int(11) NOT NULL DEFAULT '0',
1089 `allow_cid` mediumtext NOT NULL,
1090 `allow_gid` mediumtext NOT NULL,
1091 `deny_cid` mediumtext NOT NULL,
1092 `deny_gid` mediumtext NOT NULL,
1093 `openidserver` text NOT NULL,
1094 PRIMARY KEY (`uid`),
1095 KEY `nickname` (`nickname`),
1096 KEY `login_date` (`login_date`),
1097 KEY `account_expired` (`account_expired`),
1098 KEY `hidewall` (`hidewall`),
1099 KEY `blockwall` (`blockwall`),
1100 KEY `blocked` (`blocked`),
1101 KEY `verified` (`verified`),
1102 KEY `unkmail` (`unkmail`),
1103 KEY `cntunkmail` (`cntunkmail`),
1104 KEY `account_removed` (`account_removed`),
1105 KEY `service_class` (`service_class`)
1106 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1108 -- --------------------------------------------------------
1111 -- Table structure for table `userd`
1114 CREATE TABLE IF NOT EXISTS `userd` (
1115 `id` int(11) NOT NULL AUTO_INCREMENT,
1116 `username` char(255) NOT NULL,
1118 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;