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) NOT NULL,
38 `k` char(255) NOT NULL,
41 ) ENGINE=MYISAM DEFAULT CHARSET=utf8;
47 -- Table structure for table `contact`
50 CREATE TABLE IF NOT EXISTS `contact` (
51 `id` int(11) NOT NULL AUTO_INCREMENT,
52 `uid` int(11) NOT NULL COMMENT 'owner uid',
53 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
54 `self` tinyint(1) NOT NULL DEFAULT '0',
55 `rel` tinyint(1) NOT NULL DEFAULT '0',
56 `duplex` tinyint(1) NOT NULL DEFAULT '0',
57 `network` char(255) NOT NULL,
58 `name` char(255) NOT NULL,
59 `nick` char(255) NOT NULL,
60 `photo` text NOT NULL,
61 `thumb` text NOT NULL,
62 `micro` text NOT NULL,
63 `site-pubkey` text NOT NULL,
64 `issued-id` char(255) NOT NULL,
65 `dfrn-id` char(255) NOT NULL,
66 `url` char(255) NOT NULL,
67 `addr` char(255) NOT NULL,
68 `alias` char(255) NOT NULL,
69 `pubkey` text NOT NULL,
70 `prvkey` text NOT NULL,
71 `request` text NOT NULL,
72 `notify` text NOT NULL,
74 `confirm` text NOT NULL,
75 `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
76 `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
77 `usehub` tinyint(1) NOT NULL DEFAULT '0',
78 `subhub` tinyint(1) NOT NULL DEFAULT '0',
79 `hub-verify` char(255) NOT NULL,
80 `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
81 `success_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
82 `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
83 `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
84 `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
85 `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
86 `priority` tinyint(3) NOT NULL,
87 `blocked` tinyint(1) NOT NULL DEFAULT '1',
88 `readonly` tinyint(1) NOT NULL DEFAULT '0',
89 `writable` tinyint(1) NOT NULL DEFAULT '0',
90 `pending` tinyint(1) NOT NULL DEFAULT '1',
91 `rating` tinyint(1) NOT NULL DEFAULT '0',
92 `reason` text NOT NULL,
93 `info` mediumtext NOT NULL,
94 `profile-id` int(11) NOT NULL DEFAULT '0',
95 `bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag',
99 KEY `issued-id` (`issued-id`),
100 KEY `dfrn-id` (`dfrn-id`),
101 KEY `blocked` (`blocked`),
102 KEY `readonly` (`readonly`)
103 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
105 -- --------------------------------------------------------
108 -- Table structure for table `group`
111 CREATE TABLE IF NOT EXISTS `group` (
112 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
113 `uid` int(10) unsigned NOT NULL,
114 `deleted` tinyint(1) NOT NULL DEFAULT '0',
115 `name` char(255) NOT NULL,
117 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
119 -- --------------------------------------------------------
122 -- Table structure for table `group_member`
125 CREATE TABLE IF NOT EXISTS `group_member` (
126 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
127 `uid` int(10) unsigned NOT NULL,
128 `gid` int(10) unsigned NOT NULL,
129 `contact-id` int(10) unsigned NOT NULL,
131 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
133 -- --------------------------------------------------------
136 -- Table structure for table `intro`
139 CREATE TABLE IF NOT EXISTS `intro` (
140 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
141 `uid` int(10) unsigned NOT NULL,
142 `contact-id` int(11) NOT NULL,
143 `knowyou` tinyint(1) NOT NULL,
144 `duplex` tinyint(1) NOT NULL DEFAULT '0',
145 `note` text NOT NULL,
146 `hash` char(255) NOT NULL,
147 `datetime` datetime NOT NULL,
148 `blocked` tinyint(1) NOT NULL DEFAULT '1',
149 `ignore` tinyint(1) NOT NULL DEFAULT '0',
151 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
153 -- --------------------------------------------------------
156 -- Table structure for table `item`
159 CREATE TABLE IF NOT EXISTS `item` (
160 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
161 `uri` char(255) NOT NULL,
162 `uid` int(10) unsigned NOT NULL DEFAULT '0',
163 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
164 `type` char(255) NOT NULL,
165 `wall` tinyint(1) NOT NULL DEFAULT '0',
166 `gravity` tinyint(1) NOT NULL DEFAULT '0',
167 `parent` int(10) unsigned NOT NULL DEFAULT '0',
168 `parent-uri` char(255) NOT NULL,
169 `extid` char(255) NOT NULL,
170 `thr-parent` char(255) NOT NULL,
171 `created` datetime NOT NULL,
172 `edited` datetime NOT NULL,
173 `changed` datetime NOT NULL,
174 `owner-name` char(255) NOT NULL,
175 `owner-link` char(255) NOT NULL,
176 `owner-avatar` char(255) NOT NULL,
177 `author-name` char(255) NOT NULL,
178 `author-link` char(255) NOT NULL,
179 `author-avatar` char(255) NOT NULL,
180 `title` char(255) NOT NULL,
181 `body` mediumtext NOT NULL,
182 `verb` char(255) NOT NULL,
183 `object-type` char(255) NOT NULL,
184 `object` text NOT NULL,
185 `target-type` char(255) NOT NULL,
186 `target` text NOT NULL,
187 `plink` char(255) NOT NULL,
188 `resource-id` char(255) NOT NULL,
189 `event-id` int(10) unsigned NOT NULL,
190 `tag` mediumtext NOT NULL,
191 `attach` mediumtext NOT NULL,
192 `inform` mediumtext NOT NULL,
193 `location` char(255) NOT NULL,
194 `coord` char(255) NOT NULL,
195 `allow_cid` mediumtext NOT NULL,
196 `allow_gid` mediumtext NOT NULL,
197 `deny_cid` mediumtext NOT NULL,
198 `deny_gid` mediumtext NOT NULL,
199 `private` tinyint(1) NOT NULL DEFAULT '0',
200 `pubmail` tinyint(1) NOT NULL DEFAULT '0',
201 `visible` tinyint(1) NOT NULL DEFAULT '0',
202 `unseen` tinyint(1) NOT NULL DEFAULT '1',
203 `deleted` tinyint(1) NOT NULL DEFAULT '0',
204 `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
208 KEY `contact-id` (`contact-id`),
211 KEY `parent` (`parent`),
212 KEY `parent-uri` (`parent-uri`),
213 KEY `extid` (`extid`),
214 KEY `created` (`created`),
215 KEY `edited` (`edited`),
216 KEY `visible` (`visible`),
217 KEY `deleted` (`deleted`),
218 KEY `last-child` (`last-child`),
219 KEY `unseen` (`unseen`),
220 FULLTEXT KEY `title` (`title`),
221 FULLTEXT KEY `body` (`body`),
222 FULLTEXT KEY `allow_cid` (`allow_cid`),
223 FULLTEXT KEY `allow_gid` (`allow_gid`),
224 FULLTEXT KEY `deny_cid` (`deny_cid`),
225 FULLTEXT KEY `deny_gid` (`deny_gid`)
226 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
228 -- --------------------------------------------------------
231 -- Table structure for table `mail`
234 CREATE TABLE IF NOT EXISTS `mail` (
235 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
236 `uid` int(10) unsigned NOT NULL,
237 `from-name` char(255) NOT NULL,
238 `from-photo` char(255) NOT NULL,
239 `from-url` char(255) NOT NULL,
240 `contact-id` char(255) NOT NULL,
241 `title` char(255) NOT NULL,
242 `body` text NOT NULL,
243 `seen` tinyint(1) NOT NULL,
244 `replied` tinyint(1) NOT NULL,
245 `uri` char(255) NOT NULL,
246 `parent-uri` char(255) NOT NULL,
247 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
249 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
251 -- --------------------------------------------------------
254 -- Table structure for table `photo`
257 CREATE TABLE IF NOT EXISTS `photo` (
258 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
259 `uid` int(10) unsigned NOT NULL,
260 `contact-id` int(10) unsigned NOT NULL,
261 `resource-id` char(255) NOT NULL,
262 `created` datetime NOT NULL,
263 `edited` datetime NOT NULL,
264 `title` char(255) NOT NULL,
265 `desc` text NOT NULL,
266 `album` char(255) NOT NULL,
267 `filename` char(255) NOT NULL,
268 `height` smallint(6) NOT NULL,
269 `width` smallint(6) NOT NULL,
270 `data` mediumblob NOT NULL,
271 `scale` tinyint(3) NOT NULL,
272 `profile` tinyint(1) NOT NULL DEFAULT '0',
273 `allow_cid` mediumtext NOT NULL,
274 `allow_gid` mediumtext NOT NULL,
275 `deny_cid` mediumtext NOT NULL,
276 `deny_gid` mediumtext NOT NULL,
278 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
280 -- --------------------------------------------------------
283 -- Table structure for table `profile`
286 CREATE TABLE IF NOT EXISTS `profile` (
287 `id` int(11) NOT NULL AUTO_INCREMENT,
288 `uid` int(11) NOT NULL,
289 `profile-name` char(255) NOT NULL,
290 `is-default` tinyint(1) NOT NULL DEFAULT '0',
291 `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
292 `hidewall` tinyint(1) NOT NULL DEFAULT '0',
293 `name` char(255) NOT NULL,
294 `pdesc` char(255) NOT NULL,
295 `dob` char(32) NOT NULL DEFAULT '0000-00-00',
296 `address` char(255) NOT NULL,
297 `locality` char(255) NOT NULL,
298 `region` char(255) NOT NULL,
299 `postal-code` char(32) NOT NULL,
300 `country-name` char(255) NOT NULL,
301 `gender` char(32) NOT NULL,
302 `marital` char(255) NOT NULL,
303 `showwith` tinyint(1) NOT NULL DEFAULT '0',
304 `with` text NOT NULL,
305 `sexual` char(255) NOT NULL,
306 `politic` char(255) NOT NULL,
307 `religion` char(255) NOT NULL,
308 `pub_keywords` text NOT NULL,
309 `prv_keywords` text NOT NULL,
310 `about` text NOT NULL,
311 `summary` char(255) NOT NULL,
312 `music` text NOT NULL,
313 `book` text NOT NULL,
315 `film` text NOT NULL,
316 `interest` text NOT NULL,
317 `romance` text NOT NULL,
318 `work` text NOT NULL,
319 `education` text NOT NULL,
320 `contact` text NOT NULL,
321 `homepage` char(255) NOT NULL,
322 `photo` char(255) NOT NULL,
323 `thumb` char(255) NOT NULL,
324 `publish` tinyint(1) NOT NULL DEFAULT '0',
325 `net-publish` tinyint(1) NOT NULL DEFAULT '0',
327 FULLTEXT KEY `pub_keywords` (`pub_keywords`),
328 FULLTEXT KEY `prv_keywords` (`prv_keywords`)
329 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
331 -- --------------------------------------------------------
334 -- Table structure for table `profile_check`
337 CREATE TABLE IF NOT EXISTS `profile_check` (
338 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
339 `uid` int(10) unsigned NOT NULL,
340 `cid` int(10) unsigned NOT NULL,
341 `dfrn_id` char(255) NOT NULL,
342 `sec` char(255) NOT NULL,
343 `expire` int(11) NOT NULL,
345 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
347 -- --------------------------------------------------------
350 -- Table structure for table `session`
353 CREATE TABLE IF NOT EXISTS `session` (
354 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
355 `sid` char(255) NOT NULL,
356 `data` text NOT NULL,
357 `expire` int(10) unsigned NOT NULL,
360 KEY `expire` (`expire`)
361 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
363 -- --------------------------------------------------------
366 -- Table structure for table `user`
369 CREATE TABLE IF NOT EXISTS `user` (
370 `uid` int(11) NOT NULL AUTO_INCREMENT,
371 `username` char(255) NOT NULL,
372 `password` char(255) NOT NULL,
373 `nickname` char(255) NOT NULL,
374 `email` char(255) NOT NULL,
375 `openid` char(255) NOT NULL,
376 `timezone` char(128) NOT NULL,
377 `language` char(32) NOT NULL DEFAULT 'en',
378 `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
379 `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
380 `default-location` char(255) NOT NULL,
381 `allow_location` tinyint(1) NOT NULL DEFAULT '0',
382 `theme` char(255) NOT NULL,
383 `pubkey` text NOT NULL,
384 `prvkey` text NOT NULL,
385 `spubkey` text NOT NULL,
386 `sprvkey` text NOT NULL,
387 `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
388 `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
389 `blockwall` tinyint(1) unsigned NOT NULL DEFAULT '0',
390 `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
391 `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
392 `prvnets` tinyint(1) NOT NULL DEFAULT '0',
393 `pwdreset` char(255) NOT NULL,
394 `maxreq` int(11) NOT NULL DEFAULT '10',
395 `expire` int(11) unsigned NOT NULL DEFAULT '0',
396 `allow_cid` mediumtext NOT NULL,
397 `allow_gid` mediumtext NOT NULL,
398 `deny_cid` mediumtext NOT NULL,
399 `deny_gid` mediumtext NOT NULL,
400 `openidserver` text NOT NULL,
402 KEY `nickname` (`nickname`)
403 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
406 CREATE TABLE IF NOT EXISTS `register` (
407 `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
408 `hash` CHAR( 255 ) NOT NULL ,
409 `created` DATETIME NOT NULL ,
410 `uid` INT(11) UNSIGNED NOT NULL,
411 `password` CHAR(255) NOT NULL,
412 `language` CHAR(16) NOT NULL,
414 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
417 CREATE TABLE IF NOT EXISTS `clients` (
418 `client_id` VARCHAR( 20 ) NOT NULL ,
419 `pw` VARCHAR( 20 ) NOT NULL ,
420 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
421 PRIMARY KEY ( `client_id` )
422 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
424 CREATE TABLE IF NOT EXISTS `tokens` (
425 `id` VARCHAR( 40 ) NOT NULL ,
426 `client_id` VARCHAR( 20 ) NOT NULL ,
427 `expires` INT NOT NULL ,
428 `scope` VARCHAR( 200 ) NOT NULL ,
430 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
432 CREATE TABLE IF NOT EXISTS `auth_codes` (
433 `id` VARCHAR( 40 ) NOT NULL ,
434 `client_id` VARCHAR( 20 ) NOT NULL ,
435 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
436 `expires` INT NOT NULL ,
437 `scope` VARCHAR( 250 ) NOT NULL ,
439 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
441 CREATE TABLE IF NOT EXISTS `queue` (
442 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
444 `network` CHAR( 32 ) NOT NULL,
445 `created` DATETIME NOT NULL ,
446 `last` DATETIME NOT NULL ,
447 `content` MEDIUMTEXT NOT NULL
448 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
450 CREATE TABLE IF NOT EXISTS `pconfig` (
451 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
452 `uid` INT NOT NULL DEFAULT '0',
453 `cat` CHAR( 255 ) NOT NULL ,
454 `k` CHAR( 255 ) NOT NULL ,
455 `v` MEDIUMTEXT NOT NULL
456 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
459 CREATE TABLE IF NOT EXISTS `hook` (
460 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
461 `hook` CHAR( 255 ) NOT NULL ,
462 `file` CHAR( 255 ) NOT NULL ,
463 `function` CHAR( 255 ) NOT NULL
464 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
467 CREATE TABLE IF NOT EXISTS `addon` (
468 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
469 `name` CHAR( 255 ) NOT NULL ,
470 `version` CHAR( 255 ) NOT NULL ,
471 `installed` TINYINT( 1 ) NOT NULL DEFAULT '0' ,
472 `timestamp` BIGINT NOT NULL DEFAULT '0'
473 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
476 CREATE TABLE IF NOT EXISTS `event` (
477 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
480 `uri` CHAR( 255 ) NOT NULL,
481 `created` DATETIME NOT NULL ,
482 `edited` DATETIME NOT NULL ,
483 `start` DATETIME NOT NULL ,
484 `finish` DATETIME NOT NULL ,
485 `desc` TEXT NOT NULL ,
486 `location` TEXT NOT NULL ,
487 `type` CHAR( 255 ) NOT NULL ,
488 `nofinish` TINYINT( 1 ) NOT NULL DEFAULT '0',
489 `adjust` TINYINT( 1 ) NOT NULL DEFAULT '1',
490 `allow_cid` MEDIUMTEXT NOT NULL ,
491 `allow_gid` MEDIUMTEXT NOT NULL ,
492 `deny_cid` MEDIUMTEXT NOT NULL ,
493 `deny_gid` MEDIUMTEXT NOT NULL
494 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
496 CREATE TABLE IF NOT EXISTS `cache` (
497 `k` CHAR( 255 ) NOT NULL PRIMARY KEY ,
499 `updated` DATETIME NOT NULL
500 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
503 CREATE TABLE IF NOT EXISTS `fcontact` (
504 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
505 `url` CHAR( 255 ) NOT NULL ,
506 `name` CHAR( 255 ) NOT NULL ,
507 `photo` CHAR( 255 ) NOT NULL
508 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
510 CREATE TABLE IF NOT EXISTS `ffinder` (
511 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
512 `uid` INT UNSIGNED NOT NULL ,
513 `cid` INT UNSIGNED NOT NULL ,
514 `fid` INT UNSIGNED NOT NULL
515 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
518 CREATE TABLE IF NOT EXISTS `mailacct` (
519 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
521 `server` CHAR( 255 ) NOT NULL ,
523 `ssltype` CHAR( 16 ) NOT NULL,
524 `mailbox` CHAR( 255 ) NOT NULL,
525 `user` CHAR( 255 ) NOT NULL ,
526 `pass` TEXT NOT NULL ,
527 `reply_to` CHAR( 255 ) NOT NULL ,
528 `pubmail` TINYINT(1) NOT NULL DEFAULT '0',
529 `last_check` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
530 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
532 CREATE TABLE IF NOT EXISTS `attach` (
533 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
535 `hash` CHAR(64) NOT NULL,
536 `filename` CHAR(255) NOT NULL,
537 `filetype` CHAR( 64 ) NOT NULL ,
538 `filesize` INT NOT NULL ,
539 `data` LONGBLOB NOT NULL ,
540 `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
541 `edited` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
542 `allow_cid` MEDIUMTEXT NOT NULL ,
543 `allow_gid` MEDIUMTEXT NOT NULL ,
544 `deny_cid` MEDIUMTEXT NOT NULL ,
545 `deny_gid` MEDIUMTEXT NOT NULL
546 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;