]> git.mxchange.org Git - friendica.git/blob - database.sql
Merge pull request #1090 from annando/master
[friendica.git] / database.sql
1 -- phpMyAdmin SQL Dump
2 -- version 3.3.10.4
3 -- http://www.phpmyadmin.net
4 --
5
6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
7
8 -- --------------------------------------------------------
9
10 --
11 -- Table structure for table `addon`
12 --
13
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',
22   PRIMARY KEY (`id`),
23   KEY `hidden` (`hidden`)  
24 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
25
26 -- --------------------------------------------------------
27
28 --
29 -- Table structure for table `attach`
30 --
31
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,
46   PRIMARY KEY (`id`)
47 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
48
49 -- --------------------------------------------------------
50
51 --
52 -- Table structure for table `auth_codes`
53 --
54
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,
61   PRIMARY KEY (`id`)
62 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
63
64 -- --------------------------------------------------------
65
66 --
67 -- Table structure for table `cache`
68 --
69
70 CREATE TABLE IF NOT EXISTS `cache` (
71   `k` char(255) NOT NULL,
72   `v` text NOT NULL,
73   `updated` datetime NOT NULL,
74   PRIMARY KEY (`k`)
75 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
76
77 -- --------------------------------------------------------
78
79 --
80 -- Table structure for table `challenge`
81 --
82
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,
90   PRIMARY KEY (`id`)
91 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
92
93 -- --------------------------------------------------------
94
95 --
96 -- Table structure for table `clients`
97 --
98
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,
103   `name` text,
104   `icon` text,
105   `uid` int(11) NOT NULL DEFAULT '0',
106   PRIMARY KEY (`client_id`)
107 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
108
109 -- --------------------------------------------------------
110
111 --
112 -- Table structure for table `config`
113 --
114
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,
119   `v` text NOT NULL,
120   PRIMARY KEY (`id`),
121   UNIQUE KEY `access` (`cat`,`k`)
122 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
123
124 -- --------------------------------------------------------
125
126 --
127 -- Table structure for table `contact`
128 --
129
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',
186   `bd` date NOT NULL,
187   `notify_new_posts` TINYINT(1) NOT NULL DEFAULT '0',
188   `fetch_further_information` TINYINT(1) NOT NULL DEFAULT '0',
189   PRIMARY KEY (`id`),
190   KEY `uid` (`uid`),
191   KEY `self` (`self`),
192   KEY `issued-id` (`issued-id`),
193   KEY `dfrn-id` (`dfrn-id`),
194   KEY `blocked` (`blocked`),
195   KEY `readonly` (`readonly`),
196   KEY `network` (`network`),
197   KEY `name` (`name`),
198   KEY `nick` (`nick`),
199   KEY `attag` (`attag`),
200   KEY `addr` (`addr`),
201   KEY `url` (`url`),
202   KEY `batch` (`batch`),
203   KEY `nurl` (`nurl`),
204   KEY `pending` (`pending`),
205   KEY `hidden` (`hidden`),
206   KEY `archive` (`archive`),
207   KEY `forum` (`forum`)
208 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
209
210 -- --------------------------------------------------------
211
212 --
213 -- Table structure for table `conv`
214 --
215
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,
225   PRIMARY KEY (`id`),
226   KEY `created` (`created`),
227   KEY `updated` (`updated`)
228 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
229
230 -- --------------------------------------------------------
231
232 --
233 -- Table structure for table `deliverq`
234 --
235
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,
241   PRIMARY KEY (`id`)
242 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
243
244 -- --------------------------------------------------------
245
246 --
247 -- Table structure for table `dsprphotoq`
248 --
249
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,
255   PRIMARY KEY (`id`)
256 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
257
258 -- --------------------------------------------------------
259
260 --
261 -- Table structure for table `event`
262 --
263
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,
284   PRIMARY KEY (`id`),
285   KEY `uid` ( `uid` ),
286   KEY `cid` ( `cid` ),
287   KEY `uri` ( `uri` ),
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;
294
295 -- --------------------------------------------------------
296
297 --
298 -- Table structure for table `fcontact`
299 --
300
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',
318   PRIMARY KEY (`id`),
319   KEY `addr` (`addr`),
320   KEY `network` (`network`)
321 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
322
323 -- --------------------------------------------------------
324
325 --
326 -- Table structure for table `ffinder`
327 --
328
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,
334   PRIMARY KEY (`id`)
335 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
336
337 -- --------------------------------------------------------
338
339 --
340 -- Table structure for table `fserver`
341 --
342
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,
347   `key` text NOT NULL,
348   PRIMARY KEY (`id`),
349   KEY `server` (`server`)
350 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
351
352 -- --------------------------------------------------------
353
354 --
355 -- Table structure for table `fsuggest`
356 --
357
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,
368   PRIMARY KEY (`id`)
369 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
370
371 -- --------------------------------------------------------
372
373 --
374 -- Table structure for table `gcign`
375 --
376
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,
381   PRIMARY KEY (`id`),
382   KEY `uid` (`uid`),
383   KEY `gcid` (`gcid`)
384 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
385
386 -- --------------------------------------------------------
387
388 --
389 -- Table structure for table `gcontact`
390 --
391
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,
399   PRIMARY KEY (`id`),
400   KEY `nurl` (`nurl`)
401 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
402
403 -- --------------------------------------------------------
404
405 --
406 -- Table structure for table `glink`
407 --
408
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,
416   PRIMARY KEY (`id`),
417   KEY `cid` (`cid`),
418   KEY `uid` (`uid`),
419   KEY `gcid` (`gcid`),
420   KEY `zcid` (`zcid`),
421   KEY `updated` (`updated`)
422 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
423
424 -- --------------------------------------------------------
425
426 --
427 -- Table structure for table `group`
428 --
429
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,
436   PRIMARY KEY (`id`)
437 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
438
439 -- --------------------------------------------------------
440
441 --
442 -- Table structure for table `group_member`
443 --
444
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,
450   PRIMARY KEY (`id`)
451 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
452
453 -- --------------------------------------------------------
454
455 --
456 -- Table structure for table `guid`
457 --
458
459 CREATE TABLE IF NOT EXISTS `guid` (
460   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
461   `guid` char(64) NOT NULL,
462   PRIMARY KEY (`id`),
463   KEY `guid` (`guid`)
464 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
465
466 -- --------------------------------------------------------
467
468 --
469 -- Table structure for table `hook`
470 --
471
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',
478   PRIMARY KEY (`id`)
479 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
480
481 -- --------------------------------------------------------
482
483 --
484 -- Table structure for table `intro`
485 --
486
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',
499   PRIMARY KEY (`id`)
500 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
501
502 -- --------------------------------------------------------
503
504 --
505 -- Table structure for table `item`
506 --
507
508 CREATE TABLE IF NOT EXISTS `item` (
509   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
510   `guid` char(255) 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,
568   PRIMARY KEY (`id`),
569   KEY `uri` (`uri`),
570   KEY `uid` (`uid`),
571   KEY `contact-id` (`contact-id`),
572   KEY `type` (`type`),
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`),
584   KEY `guid` (`guid`),
585   KEY `origin` (`origin`),
586   KEY `wall` (`wall`),
587   KEY `forum_mode` (`forum_mode`),
588   KEY `author-link` (`author-link`),
589   KEY `bookmark` (`bookmark`),
590   KEY `moderated` (`moderated`),
591   KEY `spam` (`spam`),
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;
609
610 -- --------------------------------------------------------
611
612 --
613 -- Table structure for table `item_id`
614 --
615
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,
622   PRIMARY KEY (`id`),
623   KEY `iid` (`iid`),
624   KEY `uid` (`uid`),
625   KEY `sid` (`sid`),
626   KEY `service` (`service`)
627 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
628
629 -- --------------------------------------------------------
630
631 --
632 -- Table structure for table `locks`
633 --
634
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',
639   PRIMARY KEY (`id`)
640 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
641
642 -- --------------------------------------------------------
643
644 --
645 -- Table structure for table `mail`
646 --
647
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',
666   PRIMARY KEY (`id`),
667   KEY `reply` (`reply`),
668   KEY `uid` (`uid`),
669   KEY `guid` (`guid`),
670   KEY `seen` (`seen`),
671   KEY `uri` (`uri`),
672   KEY `parent-uri` (`parent-uri`),
673   KEY `created` (`created`),
674   KEY `convid` (`convid`),
675   KEY `unknown` (`unknown`)
676 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
677
678 -- --------------------------------------------------------
679
680 --
681 -- Table structure for table `mailacct`
682 --
683
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',
698   PRIMARY KEY (`id`)
699 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
700
701 -- --------------------------------------------------------
702
703 --
704 -- Table structure for table `manage`
705 --
706
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,
711   PRIMARY KEY (`id`),
712   KEY `uid` (`uid`),
713   KEY `mid` (`mid`)
714 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
715
716 -- --------------------------------------------------------
717
718 --
719 -- Table structure for table `notify`
720 --
721
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,
737   PRIMARY KEY (`id`),
738   KEY `type` (`type`),
739   KEY `seen` (`seen`),
740   KEY `uid` (`uid`),
741   KEY `date` (`date`),
742   KEY `hash` (`hash`),
743   KEY `parent` (`parent`),
744   KEY `link` (`link`),
745   KEY `otype` (`otype`)
746 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
747
748 -- --------------------------------------------------------
749
750 --
751 -- Table structure for table `notify-threads`
752 --
753
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,
760   PRIMARY KEY (`id`),
761   KEY `master-parent-item` (`master-parent-item`),
762   KEY `receiver-uid` (`receiver-uid`)
763 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
764
765 -- --------------------------------------------------------
766
767 --
768 -- Table structure for table `pconfig`
769 --
770
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,
777   PRIMARY KEY (`id`),
778   UNIQUE KEY `access` (`uid`,`cat`,`k`)
779 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
780
781 -- --------------------------------------------------------
782
783 --
784 -- Table structure for table `photo`
785 --
786
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,
810   PRIMARY KEY (`id`),
811   KEY `uid` (`uid`),
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;
818
819 -- --------------------------------------------------------
820
821 --
822 -- Table structure for table `poll`
823 --
824
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,
838   PRIMARY KEY (`id`),
839   KEY `uid` (`uid`)
840 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
841
842 -- --------------------------------------------------------
843
844 --
845 -- Table structure for table `poll_result`
846 --
847
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,
852   PRIMARY KEY (`id`),
853   KEY `poll_id` (`poll_id`),
854   KEY `choice` (`choice`)
855 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
856
857 -- --------------------------------------------------------
858
859 --
860 -- Table structure for table `profile`
861 --
862
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,
893   `tv` 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',
905   PRIMARY KEY (`id`),
906   FULLTEXT KEY `pub_keywords` (`pub_keywords`),
907   FULLTEXT KEY `prv_keywords` (`prv_keywords`)
908 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
909
910 -- --------------------------------------------------------
911
912 --
913 -- Table structure for table `profile_check`
914 --
915
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,
923   PRIMARY KEY (`id`)
924 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
925
926 -- --------------------------------------------------------
927
928 --
929 -- Table structure for table `queue`
930 --
931
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',
940   PRIMARY KEY (`id`),
941   KEY `cid` (`cid`),
942   KEY `network` (`network`),
943   KEY `created` (`created`),
944   KEY `last` (`last`),
945   KEY `batch` (`batch`)
946 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
947
948 -- --------------------------------------------------------
949
950 --
951 -- Table structure for table `register`
952 --
953
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,
961   PRIMARY KEY (`id`)
962 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
963
964 -- --------------------------------------------------------
965
966 --
967 -- Table structure for table `search`
968 --
969
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,
974   PRIMARY KEY (`id`),
975   KEY `uid` (`uid`),
976   KEY `term` (`term`)
977 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
978
979 -- --------------------------------------------------------
980
981 --
982 -- Table structure for table `session`
983 --
984
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,
990   PRIMARY KEY (`id`),
991   KEY `sid` (`sid`),
992   KEY `expire` (`expire`)
993 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
994
995 -- --------------------------------------------------------
996
997 --
998 -- Table structure for table `sign`
999 --
1000
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,
1008   PRIMARY KEY (`id`),
1009   KEY `iid` (`iid`),
1010   KEY `retract_iid` (`retract_iid`)
1011 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
1012
1013 -- --------------------------------------------------------
1014
1015 --
1016 -- Table structure for table `spam`
1017 --
1018
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',
1026   PRIMARY KEY (`id`),
1027   KEY `uid` (`uid`),
1028   KEY `spam` (`spam`),
1029   KEY `ham` (`ham`),
1030   KEY `term` (`term`)
1031 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1032
1033 -- --------------------------------------------------------
1034
1035 --
1036 -- Table structure for table `term`
1037 --
1038
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`),
1049   KEY `oid` (`oid`),
1050   KEY `otype` (`otype`),
1051   KEY `type` (`type`),
1052   KEY `term` (`term`),
1053   KEY `uid` (`uid`),
1054   KEY `aid` (`aid`)
1055 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
1056
1057 -- --------------------------------------------------------
1058
1059 --
1060 -- Table structure for table `tokens`
1061 --
1062
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,
1070   PRIMARY KEY (`id`)
1071 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1072
1073 -- --------------------------------------------------------
1074
1075 --
1076 -- Table structure for table `user`
1077 --
1078
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;
1135
1136 -- --------------------------------------------------------
1137
1138 --
1139 -- Table structure for table `userd`
1140 --
1141
1142 CREATE TABLE IF NOT EXISTS `userd` (
1143   `id` int(11) NOT NULL AUTO_INCREMENT,
1144   `username` char(255) NOT NULL,
1145   PRIMARY KEY (`id`)
1146 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1147
1148 -- --------------------------------------------------------
1149
1150 --
1151 -- Table structure for table `tag`
1152 --
1153
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`),
1159   KEY `tag` (`tag`)
1160 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1161
1162 -- --------------------------------------------------------
1163
1164 --
1165 -- Table structure for table `push_subscriber`
1166 --
1167
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,
1177   PRIMARY KEY (`id`)
1178 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1179
1180 -- --------------------------------------------------------
1181
1182 --
1183 -- Table structure for table `unique_contacts`
1184 --
1185
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,
1192   PRIMARY KEY (`id`),
1193   KEY `url` (`url`)
1194 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
1195
1196 -- --------------------------------------------------------
1197
1198 --
1199 -- Table structure for table `thread`
1200 --
1201
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;