3 -- http://www.phpmyadmin.net
6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
9 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
10 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
11 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
12 /*!40101 SET NAMES utf8 */;
17 -- --------------------------------------------------------
20 -- Table structure for table `challenge`
23 CREATE TABLE IF NOT EXISTS `challenge` (
24 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
25 `challenge` char(255) NOT NULL,
26 `dfrn-id` char(255) NOT NULL,
27 `expire` int(11) NOT NULL,
28 `type` char(255) NOT NULL,
29 `last_update` char(255) NOT NULL,
31 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
33 -- --------------------------------------------------------
35 CREATE TABLE IF NOT EXISTS `config` (
36 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
37 `cat` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL,
38 `k` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL,
41 UNIQUE KEY `access`(`cat`,`k`)
42 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
48 -- Table structure for table `contact`
51 CREATE TABLE IF NOT EXISTS `contact` (
52 `id` int(11) NOT NULL AUTO_INCREMENT,
53 `uid` int(11) NOT NULL COMMENT 'owner uid',
54 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
55 `self` tinyint(1) NOT NULL DEFAULT '0',
56 `remote_self` tinyint(1) NOT NULL DEFAULT '0',
57 `rel` tinyint(1) NOT NULL DEFAULT '0',
58 `duplex` tinyint(1) NOT NULL DEFAULT '0',
59 `network` char(255) NOT NULL,
60 `name` char(255) NOT NULL,
61 `nick` char(255) NOT NULL,
62 `attag` char(255) NOT NULL,
63 `photo` text NOT NULL,
64 `thumb` text NOT NULL,
65 `micro` text NOT NULL,
66 `site-pubkey` text NOT NULL,
67 `issued-id` char(255) NOT NULL,
68 `dfrn-id` char(255) NOT NULL,
69 `url` char(255) NOT NULL,
70 `nurl` char(255) NOT NULL,
71 `addr` char(255) NOT NULL,
72 `alias` char(255) NOT NULL,
73 `pubkey` text NOT NULL,
74 `prvkey` text NOT NULL,
75 `batch` char(255) NOT NULL,
76 `request` text NOT NULL,
77 `notify` text NOT NULL,
79 `confirm` text NOT NULL,
81 `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
82 `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
83 `usehub` tinyint(1) NOT NULL DEFAULT '0',
84 `subhub` tinyint(1) NOT NULL DEFAULT '0',
85 `hub-verify` char(255) NOT NULL,
86 `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
87 `success_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
88 `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
89 `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
90 `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
91 `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
92 `priority` tinyint(3) NOT NULL,
93 `blocked` tinyint(1) NOT NULL DEFAULT '1',
94 `readonly` tinyint(1) NOT NULL DEFAULT '0',
95 `writable` tinyint(1) NOT NULL DEFAULT '0',
96 `forum` tinyint(1) NOT NULL DEFAULT '0',
97 `hidden` tinyint(1) NOT NULL DEFAULT '0',
98 `pending` tinyint(1) NOT NULL DEFAULT '1',
99 `rating` tinyint(1) NOT NULL DEFAULT '0',
100 `reason` text NOT NULL,
101 `closeness` tinyint(2) NOT NULL DEFAULT '99',
102 `info` mediumtext NOT NULL,
103 `profile-id` int(11) NOT NULL DEFAULT '0',
104 `bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag',
109 KEY `network` (`network`),
112 KEY `attag` (`attag`),
116 KEY `batch` (`batch`),
117 KEY `issued-id` (`issued-id`),
118 KEY `dfrn-id` (`dfrn-id`),
119 KEY `blocked` (`blocked`),
120 KEY `readonly` (`readonly`),
121 KEY `forum` (`forum`),
122 KEY `hidden` (`hidden`),
123 KEY `pending` (`pending`),
124 KEY `closeness` (`closeness`)
125 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
127 -- --------------------------------------------------------
130 -- Table structure for table `group`
133 CREATE TABLE IF NOT EXISTS `group` (
134 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
135 `uid` int(10) unsigned NOT NULL,
136 `visible` tinyint(1) NOT NULL DEFAULT '0',
137 `deleted` tinyint(1) NOT NULL DEFAULT '0',
138 `name` char(255) NOT NULL,
140 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
142 -- --------------------------------------------------------
145 -- Table structure for table `group_member`
148 CREATE TABLE IF NOT EXISTS `group_member` (
149 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
150 `uid` int(10) unsigned NOT NULL,
151 `gid` int(10) unsigned NOT NULL,
152 `contact-id` int(10) unsigned NOT NULL,
154 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
156 -- --------------------------------------------------------
159 -- Table structure for table `intro`
162 CREATE TABLE IF NOT EXISTS `intro` (
163 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
164 `uid` int(10) unsigned NOT NULL,
165 `fid` int(11) NOT NULL DEFAULT '0',
166 `contact-id` int(11) NOT NULL,
167 `knowyou` tinyint(1) NOT NULL,
168 `duplex` tinyint(1) NOT NULL DEFAULT '0',
169 `note` text NOT NULL,
170 `hash` char(255) NOT NULL,
171 `datetime` datetime NOT NULL,
172 `blocked` tinyint(1) NOT NULL DEFAULT '1',
173 `ignore` tinyint(1) NOT NULL DEFAULT '0',
175 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
177 -- --------------------------------------------------------
180 -- Table structure for table `item`
183 CREATE TABLE IF NOT EXISTS `item` (
184 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
185 `guid` char(64) NOT NULL,
186 `uri` char(255) NOT NULL,
187 `uid` int(10) unsigned NOT NULL DEFAULT '0',
188 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
189 `type` char(255) NOT NULL,
190 `wall` tinyint(1) NOT NULL DEFAULT '0',
191 `gravity` tinyint(1) NOT NULL DEFAULT '0',
192 `parent` int(10) unsigned NOT NULL DEFAULT '0',
193 `parent-uri` char(255) NOT NULL,
194 `extid` char(255) NOT NULL,
195 `thr-parent` char(255) NOT NULL,
196 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
197 `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
198 `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
199 `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
200 `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
201 `owner-name` char(255) NOT NULL,
202 `owner-link` char(255) NOT NULL,
203 `owner-avatar` char(255) NOT NULL,
204 `author-name` char(255) NOT NULL,
205 `author-link` char(255) NOT NULL,
206 `author-avatar` char(255) NOT NULL,
207 `title` char(255) NOT NULL,
208 `body` mediumtext NOT NULL,
209 `app` char(255) NOT NULL,
210 `verb` char(255) NOT NULL,
211 `object-type` char(255) NOT NULL,
212 `object` text NOT NULL,
213 `target-type` char(255) NOT NULL,
214 `target` text NOT NULL,
215 `postopts` text NOT NULL,
216 `plink` char(255) NOT NULL,
217 `resource-id` char(255) NOT NULL,
218 `event-id` int(10) unsigned NOT NULL,
219 `tag` mediumtext NOT NULL,
220 `attach` mediumtext NOT NULL,
221 `inform` mediumtext NOT NULL,
222 `file` mediumtext NOT NULL,
223 `location` char(255) NOT NULL,
224 `coord` char(255) NOT NULL,
225 `allow_cid` mediumtext NOT NULL,
226 `allow_gid` mediumtext NOT NULL,
227 `deny_cid` mediumtext NOT NULL,
228 `deny_gid` mediumtext NOT NULL,
229 `private` tinyint(1) NOT NULL DEFAULT '0',
230 `pubmail` tinyint(1) NOT NULL DEFAULT '0',
231 `moderated` tinyint(1) NOT NULL DEFAULT '0',
232 `visible` tinyint(1) NOT NULL DEFAULT '0',
233 `spam` tinyint(1) NOT NULL DEFAULT '0',
234 `starred` tinyint(1) NOT NULL DEFAULT '0',
235 `bookmark` tinyint(1) NOT NULL DEFAULT '0',
236 `unseen` tinyint(1) NOT NULL DEFAULT '1',
237 `deleted` tinyint(1) NOT NULL DEFAULT '0',
238 `origin` tinyint(1) NOT NULL DEFAULT '0',
239 `forum_mode` tinyint(1) NOT NULL DEFAULT '0',
240 `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
245 KEY `contact-id` (`contact-id`),
247 KEY `parent` (`parent`),
248 KEY `parent-uri` (`parent-uri`),
249 KEY `extid` (`extid`),
250 KEY `created` (`created`),
251 KEY `edited` (`edited`),
252 KEY `received` (`received`),
253 KEY `moderated` (`moderated`),
254 KEY `visible` (`visible`),
256 KEY `starred` (`starred`),
257 KEY `bookmark` (`bookmark`),
258 KEY `deleted` (`deleted`),
259 KEY `origin` (`origin`),
260 KEY `forum_mode` (`forum_mode`),
261 KEY `last-child` (`last-child`),
262 KEY `unseen` (`unseen`),
264 KEY `author-name` (`author-name`),
265 KEY `author-link` (`author-link`),
266 FULLTEXT KEY `title` (`title`),
267 FULLTEXT KEY `body` (`body`),
268 FULLTEXT KEY `tag` (`tag`),
269 FULLTEXT KEY `file` (`file`),
270 FULLTEXT KEY `allow_cid` (`allow_cid`),
271 FULLTEXT KEY `allow_gid` (`allow_gid`),
272 FULLTEXT KEY `deny_cid` (`deny_cid`),
273 FULLTEXT KEY `deny_gid` (`deny_gid`)
274 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
276 -- --------------------------------------------------------
279 -- Table structure for table `mail`
282 CREATE TABLE IF NOT EXISTS `mail` (
283 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
284 `uid` int(10) unsigned NOT NULL,
285 `guid` char(64) NOT NULL,
286 `from-name` char(255) NOT NULL,
287 `from-photo` char(255) NOT NULL,
288 `from-url` char(255) NOT NULL,
289 `contact-id` char(255) NOT NULL,
290 `convid` int(10) unsigned NOT NULL,
291 `title` char(255) NOT NULL,
292 `body` mediumtext NOT NULL,
293 `seen` tinyint(1) NOT NULL DEFAULT '0',
294 `reply` tinyint(1) NOT NULL DEFAULT '0',
295 `replied` tinyint(1) NOT NULL DEFAULT '0',
296 `unknown` tinyint(1) NOT NULL DEFAULT '0',
297 `uri` char(255) NOT NULL,
298 `parent-uri` char(255) NOT NULL,
299 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
303 KEY `convid` (`convid`),
304 KEY `reply` (`reply`),
305 KEY `unknown` (`unknown`),
307 KEY `parent-uri` (`parent-uri`),
308 KEY `created` (`created`)
309 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
311 -- --------------------------------------------------------
314 -- Table structure for table `photo`
317 CREATE TABLE IF NOT EXISTS `photo` (
318 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
319 `uid` int(10) unsigned NOT NULL,
320 `contact-id` int(10) unsigned NOT NULL,
321 `guid` char(64) NOT NULL,
322 `resource-id` char(255) NOT NULL,
323 `created` datetime NOT NULL,
324 `edited` datetime NOT NULL,
325 `title` char(255) NOT NULL,
326 `desc` text NOT NULL,
327 `album` char(255) NOT NULL,
328 `filename` char(255) NOT NULL,
329 `height` smallint(6) NOT NULL,
330 `width` smallint(6) NOT NULL,
331 `data` mediumblob NOT NULL,
332 `scale` tinyint(3) NOT NULL,
333 `profile` tinyint(1) NOT NULL DEFAULT '0',
334 `allow_cid` mediumtext NOT NULL,
335 `allow_gid` mediumtext NOT NULL,
336 `deny_cid` mediumtext NOT NULL,
337 `deny_gid` mediumtext NOT NULL,
340 KEY `resource-id` (`resource-id`),
341 KEY `album` (`album`),
342 KEY `scale` (`scale`),
343 KEY `profile` (`profile`),
345 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
347 -- --------------------------------------------------------
350 -- Table structure for table `profile`
353 CREATE TABLE IF NOT EXISTS `profile` (
354 `id` int(11) NOT NULL AUTO_INCREMENT,
355 `uid` int(11) NOT NULL,
356 `profile-name` char(255) NOT NULL,
357 `is-default` tinyint(1) NOT NULL DEFAULT '0',
358 `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
359 `name` char(255) NOT NULL,
360 `pdesc` char(255) NOT NULL,
361 `dob` char(32) NOT NULL DEFAULT '0000-00-00',
362 `address` char(255) NOT NULL,
363 `locality` char(255) NOT NULL,
364 `region` char(255) NOT NULL,
365 `postal-code` char(32) NOT NULL,
366 `country-name` char(255) NOT NULL,
367 `gender` char(32) NOT NULL,
368 `marital` char(255) NOT NULL,
369 `showwith` tinyint(1) NOT NULL DEFAULT '0',
370 `with` text NOT NULL,
371 `sexual` char(255) NOT NULL,
372 `politic` char(255) NOT NULL,
373 `religion` char(255) NOT NULL,
374 `pub_keywords` text NOT NULL,
375 `prv_keywords` text NOT NULL,
376 `about` text NOT NULL,
377 `summary` char(255) NOT NULL,
378 `music` text NOT NULL,
379 `book` text NOT NULL,
381 `film` text NOT NULL,
382 `interest` text NOT NULL,
383 `romance` text NOT NULL,
384 `work` text NOT NULL,
385 `education` text NOT NULL,
386 `contact` text NOT NULL,
387 `homepage` char(255) NOT NULL,
388 `photo` char(255) NOT NULL,
389 `thumb` char(255) NOT NULL,
390 `publish` tinyint(1) NOT NULL DEFAULT '0',
391 `net-publish` tinyint(1) NOT NULL DEFAULT '0',
393 FULLTEXT KEY `pub_keywords` (`pub_keywords`),
394 FULLTEXT KEY `prv_keywords` (`prv_keywords`)
395 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
397 -- --------------------------------------------------------
400 -- Table structure for table `profile_check`
403 CREATE TABLE IF NOT EXISTS `profile_check` (
404 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
405 `uid` int(10) unsigned NOT NULL,
406 `cid` int(10) unsigned NOT NULL,
407 `dfrn_id` char(255) NOT NULL,
408 `sec` char(255) NOT NULL,
409 `expire` int(11) NOT NULL,
411 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
413 -- --------------------------------------------------------
416 -- Table structure for table `session`
419 CREATE TABLE IF NOT EXISTS `session` (
420 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
421 `sid` char(255) NOT NULL,
422 `data` text NOT NULL,
423 `expire` int(10) unsigned NOT NULL,
426 KEY `expire` (`expire`)
427 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
429 -- --------------------------------------------------------
432 -- Table structure for table `user`
435 CREATE TABLE IF NOT EXISTS `user` (
436 `uid` int(11) NOT NULL AUTO_INCREMENT,
437 `guid` char(16) NOT NULL,
438 `username` char(255) NOT NULL,
439 `password` char(255) NOT NULL,
440 `nickname` char(255) NOT NULL,
441 `email` char(255) NOT NULL,
442 `openid` char(255) NOT NULL,
443 `timezone` char(128) NOT NULL,
444 `language` char(32) NOT NULL DEFAULT 'en',
445 `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
446 `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
447 `default-location` char(255) NOT NULL,
448 `allow_location` tinyint(1) NOT NULL DEFAULT '0',
449 `theme` char(255) NOT NULL,
450 `pubkey` text NOT NULL,
451 `prvkey` text NOT NULL,
452 `spubkey` text NOT NULL,
453 `sprvkey` text NOT NULL,
454 `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
455 `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
456 `blockwall` tinyint(1) unsigned NOT NULL DEFAULT '0',
457 `hidewall` tinyint(1) unsigned NOT NULL DEFAULT '0',
458 `blocktags` tinyint(1) unsigned NOT NULL DEFAULT '0',
459 `unkmail` tinyint(1) unsigned NOT NULL DEFAULT '0',
460 `cntunkmail` int(11) unsigned NOT NULL DEFAULT '10',
461 `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
462 `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
463 `prvnets` tinyint(1) NOT NULL DEFAULT '0',
464 `pwdreset` char(255) NOT NULL,
465 `maxreq` int(11) NOT NULL DEFAULT '10',
466 `expire` int(11) unsigned NOT NULL DEFAULT '0',
467 `account_expired` tinyint( 1 ) NOT NULL DEFAULT '0',
468 `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
469 `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
470 `allow_cid` mediumtext NOT NULL,
471 `allow_gid` mediumtext NOT NULL,
472 `deny_cid` mediumtext NOT NULL,
473 `deny_gid` mediumtext NOT NULL,
474 `openidserver` text NOT NULL,
476 KEY `nickname` (`nickname`),
477 KEY `account_expired` (`account_expired`),
478 KEY `hidewall` (`hidewall`),
479 KEY `blockwall` (`blockwall`),
480 KEY `unkmail` (`unkmail`),
481 KEY `cntunkmail` (`cntunkmail`),
482 KEY `blocked` (`blocked`),
483 KEY `verified` (`verified`),
484 KEY `login_date` (`login_date`)
485 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
488 CREATE TABLE IF NOT EXISTS `register` (
489 `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
490 `hash` CHAR( 255 ) NOT NULL ,
491 `created` DATETIME NOT NULL ,
492 `uid` INT(11) UNSIGNED NOT NULL,
493 `password` CHAR(255) NOT NULL,
494 `language` CHAR(16) NOT NULL,
496 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
499 CREATE TABLE IF NOT EXISTS `clients` (
500 `client_id` VARCHAR( 20 ) NOT NULL ,
501 `pw` VARCHAR( 20 ) NOT NULL ,
502 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
503 `name` VARCHAR( 128 ) NULL DEFAULT NULL,
504 `icon` VARCHAR( 255 ) NULL DEFAULT NULL,
505 `uid` INT NOT NULL DEFAULT 0,
506 PRIMARY KEY ( `client_id` )
507 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
509 CREATE TABLE IF NOT EXISTS `tokens` (
510 `id` VARCHAR( 40 ) NOT NULL ,
511 `secret` VARCHAR( 40 ) NOT NULL ,
512 `client_id` VARCHAR( 20 ) NOT NULL ,
513 `expires` INT NOT NULL ,
514 `scope` VARCHAR( 200 ) NOT NULL ,
517 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
519 CREATE TABLE IF NOT EXISTS `auth_codes` (
520 `id` VARCHAR( 40 ) NOT NULL ,
521 `client_id` VARCHAR( 20 ) NOT NULL ,
522 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
523 `expires` INT NOT NULL ,
524 `scope` VARCHAR( 250 ) NOT NULL ,
526 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
528 CREATE TABLE IF NOT EXISTS `queue` (
529 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
531 `network` CHAR( 32 ) NOT NULL,
532 `created` DATETIME NOT NULL ,
533 `last` DATETIME NOT NULL ,
534 `content` MEDIUMTEXT NOT NULL,
535 `batch` TINYINT( 1 ) NOT NULL DEFAULT '0',
541 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
543 CREATE TABLE IF NOT EXISTS `pconfig` (
544 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
545 `uid` INT NOT NULL DEFAULT '0',
546 `cat` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL ,
547 `k` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL ,
548 `v` MEDIUMTEXT NOT NULL,
549 UNIQUE KEY `access`(`cat`, `k`)
550 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
553 CREATE TABLE IF NOT EXISTS `hook` (
554 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
555 `hook` CHAR( 255 ) NOT NULL ,
556 `file` CHAR( 255 ) NOT NULL ,
557 `function` CHAR( 255 ) NOT NULL
558 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
561 CREATE TABLE IF NOT EXISTS `addon` (
562 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
563 `name` CHAR( 255 ) NOT NULL ,
564 `version` CHAR( 255 ) NOT NULL ,
565 `installed` TINYINT( 1 ) NOT NULL DEFAULT '0' ,
566 `timestamp` BIGINT NOT NULL DEFAULT '0' ,
567 `plugin_admin` TINYINT( 1 ) NOT NULL DEFAULT '0'
568 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
571 CREATE TABLE IF NOT EXISTS `event` (
572 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
575 `uri` CHAR( 255 ) NOT NULL,
576 `created` DATETIME NOT NULL ,
577 `edited` DATETIME NOT NULL ,
578 `start` DATETIME NOT NULL ,
579 `finish` DATETIME NOT NULL ,
580 `desc` TEXT NOT NULL ,
581 `location` TEXT NOT NULL ,
582 `type` CHAR( 255 ) NOT NULL ,
583 `nofinish` TINYINT( 1 ) NOT NULL DEFAULT '0',
584 `adjust` TINYINT( 1 ) NOT NULL DEFAULT '1',
585 `allow_cid` MEDIUMTEXT NOT NULL ,
586 `allow_gid` MEDIUMTEXT NOT NULL ,
587 `deny_cid` MEDIUMTEXT NOT NULL ,
588 `deny_gid` MEDIUMTEXT NOT NULL
589 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
591 CREATE TABLE IF NOT EXISTS `cache` (
592 `k` CHAR( 255 ) NOT NULL PRIMARY KEY ,
594 `updated` DATETIME NOT NULL
595 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
598 CREATE TABLE IF NOT EXISTS `fcontact` (
599 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
600 `url` CHAR( 255 ) NOT NULL ,
601 `name` CHAR( 255 ) NOT NULL ,
602 `photo` CHAR( 255 ) NOT NULL ,
603 `request` CHAR( 255 ) NOT NULL,
604 `nick` CHAR( 255 ) NOT NULL ,
605 `addr` CHAR( 255 ) NOT NULL ,
606 `batch` CHAR( 255) NOT NULL,
607 `notify` CHAR( 255 ) NOT NULL ,
608 `poll` CHAR( 255 ) NOT NULL ,
609 `confirm` CHAR( 255 ) NOT NULL ,
610 `priority` TINYINT( 1 ) NOT NULL ,
611 `network` CHAR( 32 ) NOT NULL ,
612 `alias` CHAR( 255 ) NOT NULL ,
613 `pubkey` TEXT NOT NULL ,
614 `updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
617 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
619 CREATE TABLE IF NOT EXISTS `ffinder` (
620 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
621 `uid` INT UNSIGNED NOT NULL ,
622 `cid` INT UNSIGNED NOT NULL ,
623 `fid` INT UNSIGNED NOT NULL
624 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
627 CREATE TABLE IF NOT EXISTS `fsuggest` (
628 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
631 `name` CHAR( 255 ) NOT NULL ,
632 `url` CHAR( 255 ) NOT NULL ,
633 `request` CHAR( 255 ) NOT NULL,
634 `photo` CHAR( 255 ) NOT NULL ,
635 `note` TEXT NOT NULL ,
636 `created` DATETIME NOT NULL
637 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
640 CREATE TABLE IF NOT EXISTS `mailacct` (
641 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
643 `server` CHAR( 255 ) NOT NULL ,
645 `ssltype` CHAR( 16 ) NOT NULL,
646 `mailbox` CHAR( 255 ) NOT NULL,
647 `user` CHAR( 255 ) NOT NULL ,
648 `pass` TEXT NOT NULL ,
649 `reply_to` CHAR( 255 ) NOT NULL ,
650 `action` INT NOT NULL ,
651 `movetofolder` CHAR(255) NOT NULL ,
652 `pubmail` TINYINT(1) NOT NULL DEFAULT '0',
653 `last_check` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
654 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
656 CREATE TABLE IF NOT EXISTS `attach` (
657 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
659 `hash` CHAR(64) NOT NULL,
660 `filename` CHAR(255) NOT NULL,
661 `filetype` CHAR( 64 ) NOT NULL ,
662 `filesize` INT NOT NULL ,
663 `data` LONGBLOB NOT NULL ,
664 `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
665 `edited` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
666 `allow_cid` MEDIUMTEXT NOT NULL ,
667 `allow_gid` MEDIUMTEXT NOT NULL ,
668 `deny_cid` MEDIUMTEXT NOT NULL ,
669 `deny_gid` MEDIUMTEXT NOT NULL
670 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
672 CREATE TABLE IF NOT EXISTS `guid` (
673 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
674 `guid` CHAR( 64 ) NOT NULL ,
676 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
679 CREATE TABLE IF NOT EXISTS `sign` (
680 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
681 `iid` INT UNSIGNED NOT NULL ,
682 `signed_text` MEDIUMTEXT NOT NULL ,
683 `signature` TEXT NOT NULL ,
684 `signer` CHAR( 255 ) NOT NULL ,
686 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
689 CREATE TABLE IF NOT EXISTS `deliverq` (
690 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
691 `cmd` CHAR( 32 ) NOT NULL ,
692 `item` INT NOT NULL ,
693 `contact` INT NOT NULL
694 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
696 CREATE TABLE IF NOT EXISTS `search` (
697 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
699 `term` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
702 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
704 CREATE TABLE IF NOT EXISTS `fserver` (
705 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
706 `server` CHAR( 255 ) NOT NULL ,
707 `posturl` CHAR( 255 ) NOT NULL ,
710 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
712 CREATE TABLE IF NOT EXISTS `gcontact` (
713 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
714 `name` CHAR( 255 ) NOT NULL ,
715 `url` CHAR( 255 ) NOT NULL ,
716 `nurl` CHAR( 255 ) NOT NULL ,
717 `photo` CHAR( 255 ) NOT NULL,
718 `connect` CHAR( 255 ) NOT NULL,
720 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
722 CREATE TABLE IF NOT EXISTS `glink` (
723 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
727 `updated` DATETIME NOT NULL,
732 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
734 CREATE TABLE IF NOT EXISTS `gcign` (
735 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
740 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
743 CREATE TABLE IF NOT EXISTS `conv` (
744 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
745 `guid` CHAR( 64 ) NOT NULL ,
746 `recips` MEDIUMTEXT NOT NULL ,
748 `creator` CHAR( 255 ) NOT NULL ,
749 `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
750 `updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
751 `subject` MEDIUMTEXT NOT NULL,
754 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
757 CREATE TABLE IF NOT EXISTS `notify` (
758 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
759 `hash` CHAR( 64 ) NOT NULL,
760 `type` INT( 11 ) NOT NULL ,
761 `name` CHAR( 255 ) NOT NULL ,
762 `url` CHAR( 255 ) NOT NULL ,
763 `photo` CHAR( 255 ) NOT NULL ,
764 `date` DATETIME NOT NULL ,
765 `msg` MEDIUMTEXT NOT NULL ,
767 `link` CHAR( 255 ) NOT NULL ,
768 `parent` INT( 11 ) NOT NULL,
769 `seen` TINYINT( 1 ) NOT NULL DEFAULT '0',
770 `verb` CHAR( 255 ) NOT NULL,
771 `otype` CHAR( 16 ) NOT NULL,
780 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
782 CREATE TABLE IF NOT EXISTS `item_id` (
785 `face` CHAR( 255 ) NOT NULL ,
786 `dspr` CHAR( 255 ) NOT NULL ,
787 `twit` CHAR( 255 ) NOT NULL ,
788 `stat` CHAR( 255 ) NOT NULL ,
789 PRIMARY KEY ( `iid` ),
795 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
797 CREATE TABLE IF NOT EXISTS `manage` (
798 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
803 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
805 CREATE TABLE IF NOT EXISTS `poll_result` (
806 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
807 `poll_id` INT NOT NULL ,
808 `choice` INT NOT NULL ,
811 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
814 CREATE TABLE IF NOT EXISTS `poll` (
815 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
817 `q0` MEDIUMTEXT NOT NULL ,
818 `q1` MEDIUMTEXT NOT NULL ,
819 `q2` MEDIUMTEXT NOT NULL ,
820 `q3` MEDIUMTEXT NOT NULL ,
821 `q4` MEDIUMTEXT NOT NULL ,
822 `q5` MEDIUMTEXT NOT NULL ,
823 `q6` MEDIUMTEXT NOT NULL ,
824 `q7` MEDIUMTEXT NOT NULL ,
825 `q8` MEDIUMTEXT NOT NULL ,
826 `q9` MEDIUMTEXT NOT NULL ,
828 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
832 -- Table structure for table `notify-threads`
834 -- notify-id: notify.id of the first notification of this thread
835 -- master-parent-item: item.id of the parent item
836 -- parent-item: item.id of the imediate parent (only for multi-thread)
838 -- receiver-uid: user.uid of the receiver of this notification.
840 -- If we query for a master-parent-item and receiver-uid...
841 -- * Returns 1 item: this is not the parent notification,
842 -- so just "follow" the thread (references to this notification)
843 -- * Returns no item: this is the first notification related to
844 -- this parent item. So, create the record and use the message-id
848 CREATE TABLE IF NOT EXISTS `notify-threads` (
849 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
850 `notify-id` INT NOT NULL,
851 `master-parent-item` INT( 10 ) unsigned NOT NULL DEFAULT '0',
852 `parent-item` INT( 10 ) unsigned NOT NULL DEFAULT '0',
853 `receiver-uid` INT NOT NULL,
854 INDEX ( `master-parent-item` ),
855 INDEX ( `receiver-uid` )
856 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
858 CREATE TABLE IF NOT EXISTS `spam` (
859 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
861 `spam` INT NOT NULL DEFAULT '0',
862 `ham` INT NOT NULL DEFAULT '0',
863 `term` CHAR(255) NOT NULL,
864 `date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
869 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
872 CREATE TABLE IF NOT EXISTS `userd` (
873 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
874 `username` CHAR( 255 ) NOT NULL,
876 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;