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 `alias` char(255) NOT NULL,
68 `pubkey` text NOT NULL,
69 `prvkey` text NOT NULL,
70 `request` text NOT NULL,
71 `notify` text NOT NULL,
73 `confirm` text NOT NULL,
74 `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
75 `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
76 `usehub` tinyint(1) NOT NULL DEFAULT '0',
77 `subhub` tinyint(1) NOT NULL DEFAULT '0',
78 `hub-verify` char(255) NOT NULL,
79 `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
80 `success_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
81 `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
82 `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
83 `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
84 `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
85 `priority` tinyint(3) NOT NULL,
86 `blocked` tinyint(1) NOT NULL DEFAULT '1',
87 `readonly` tinyint(1) NOT NULL DEFAULT '0',
88 `writable` tinyint(1) NOT NULL DEFAULT '0',
89 `pending` tinyint(1) NOT NULL DEFAULT '1',
90 `rating` tinyint(1) NOT NULL DEFAULT '0',
91 `reason` text NOT NULL,
92 `info` mediumtext NOT NULL,
93 `profile-id` int(11) NOT NULL DEFAULT '0',
94 `bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag',
98 KEY `issued-id` (`issued-id`),
99 KEY `dfrn-id` (`dfrn-id`),
100 KEY `blocked` (`blocked`),
101 KEY `readonly` (`readonly`)
102 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
104 -- --------------------------------------------------------
107 -- Table structure for table `group`
110 CREATE TABLE IF NOT EXISTS `group` (
111 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
112 `uid` int(10) unsigned NOT NULL,
113 `deleted` tinyint(1) NOT NULL DEFAULT '0',
114 `name` char(255) NOT NULL,
116 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
118 -- --------------------------------------------------------
121 -- Table structure for table `group_member`
124 CREATE TABLE IF NOT EXISTS `group_member` (
125 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
126 `uid` int(10) unsigned NOT NULL,
127 `gid` int(10) unsigned NOT NULL,
128 `contact-id` int(10) unsigned NOT NULL,
130 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
132 -- --------------------------------------------------------
135 -- Table structure for table `intro`
138 CREATE TABLE IF NOT EXISTS `intro` (
139 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
140 `uid` int(10) unsigned NOT NULL,
141 `contact-id` int(11) NOT NULL,
142 `knowyou` tinyint(1) NOT NULL,
143 `duplex` tinyint(1) NOT NULL DEFAULT '0',
144 `note` text NOT NULL,
145 `hash` char(255) NOT NULL,
146 `datetime` datetime NOT NULL,
147 `blocked` tinyint(1) NOT NULL DEFAULT '1',
148 `ignore` tinyint(1) NOT NULL DEFAULT '0',
150 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
152 -- --------------------------------------------------------
155 -- Table structure for table `item`
158 CREATE TABLE IF NOT EXISTS `item` (
159 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
160 `uri` char(255) NOT NULL,
161 `uid` int(10) unsigned NOT NULL DEFAULT '0',
162 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
163 `type` char(255) NOT NULL,
164 `wall` tinyint(1) NOT NULL DEFAULT '0',
165 `gravity` tinyint(1) NOT NULL DEFAULT '0',
166 `parent` int(10) unsigned NOT NULL DEFAULT '0',
167 `parent-uri` char(255) NOT NULL,
168 `thr-parent` char(255) NOT NULL,
169 `created` datetime NOT NULL,
170 `edited` datetime NOT NULL,
171 `changed` datetime NOT NULL,
172 `owner-name` char(255) NOT NULL,
173 `owner-link` char(255) NOT NULL,
174 `owner-avatar` char(255) NOT NULL,
175 `author-name` char(255) NOT NULL,
176 `author-link` char(255) NOT NULL,
177 `author-avatar` char(255) NOT NULL,
178 `title` char(255) NOT NULL,
179 `body` mediumtext NOT NULL,
180 `verb` char(255) NOT NULL,
181 `object-type` char(255) NOT NULL,
182 `object` text NOT NULL,
183 `target-type` char(255) NOT NULL,
184 `target` text NOT NULL,
185 `plink` char(255) NOT NULL,
186 `resource-id` char(255) NOT NULL,
187 `tag` mediumtext NOT NULL,
188 `attach` mediumtext NOT NULL,
189 `inform` mediumtext NOT NULL,
190 `location` char(255) NOT NULL,
191 `coord` char(255) NOT NULL,
192 `allow_cid` mediumtext NOT NULL,
193 `allow_gid` mediumtext NOT NULL,
194 `deny_cid` mediumtext NOT NULL,
195 `deny_gid` mediumtext NOT NULL,
196 `private` tinyint(1) NOT NULL DEFAULT '0',
197 `visible` tinyint(1) NOT NULL DEFAULT '0',
198 `unseen` tinyint(1) NOT NULL DEFAULT '1',
199 `deleted` tinyint(1) NOT NULL DEFAULT '0',
200 `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
204 KEY `contact-id` (`contact-id`),
207 KEY `parent` (`parent`),
208 KEY `parent-uri` (`parent-uri`),
209 KEY `created` (`created`),
210 KEY `edited` (`edited`),
211 KEY `visible` (`visible`),
212 KEY `deleted` (`deleted`),
213 KEY `last-child` (`last-child`),
214 KEY `unseen` (`unseen`),
215 FULLTEXT KEY `title` (`title`),
216 FULLTEXT KEY `body` (`body`),
217 FULLTEXT KEY `allow_cid` (`allow_cid`),
218 FULLTEXT KEY `allow_gid` (`allow_gid`),
219 FULLTEXT KEY `deny_cid` (`deny_cid`),
220 FULLTEXT KEY `deny_gid` (`deny_gid`)
221 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
223 -- --------------------------------------------------------
226 -- Table structure for table `mail`
229 CREATE TABLE IF NOT EXISTS `mail` (
230 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
231 `uid` int(10) unsigned NOT NULL,
232 `from-name` char(255) NOT NULL,
233 `from-photo` char(255) NOT NULL,
234 `from-url` char(255) NOT NULL,
235 `contact-id` char(255) NOT NULL,
236 `title` char(255) NOT NULL,
237 `body` text NOT NULL,
238 `seen` tinyint(1) NOT NULL,
239 `replied` tinyint(1) NOT NULL,
240 `uri` char(255) NOT NULL,
241 `parent-uri` char(255) NOT NULL,
242 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
244 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
246 -- --------------------------------------------------------
249 -- Table structure for table `photo`
252 CREATE TABLE IF NOT EXISTS `photo` (
253 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
254 `uid` int(10) unsigned NOT NULL,
255 `contact-id` int(10) unsigned NOT NULL,
256 `resource-id` char(255) NOT NULL,
257 `created` datetime NOT NULL,
258 `edited` datetime NOT NULL,
259 `title` char(255) NOT NULL,
260 `desc` text NOT NULL,
261 `album` char(255) NOT NULL,
262 `filename` char(255) NOT NULL,
263 `height` smallint(6) NOT NULL,
264 `width` smallint(6) NOT NULL,
265 `data` mediumblob NOT NULL,
266 `scale` tinyint(3) NOT NULL,
267 `profile` tinyint(1) NOT NULL DEFAULT '0',
268 `allow_cid` mediumtext NOT NULL,
269 `allow_gid` mediumtext NOT NULL,
270 `deny_cid` mediumtext NOT NULL,
271 `deny_gid` mediumtext NOT NULL,
273 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
275 -- --------------------------------------------------------
278 -- Table structure for table `profile`
281 CREATE TABLE IF NOT EXISTS `profile` (
282 `id` int(11) NOT NULL AUTO_INCREMENT,
283 `uid` int(11) NOT NULL,
284 `profile-name` char(255) NOT NULL,
285 `is-default` tinyint(1) NOT NULL DEFAULT '0',
286 `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
287 `name` char(255) NOT NULL,
288 `pdesc` char(255) NOT NULL,
289 `dob` char(32) NOT NULL DEFAULT '0000-00-00',
290 `address` char(255) NOT NULL,
291 `locality` char(255) NOT NULL,
292 `region` char(255) NOT NULL,
293 `postal-code` char(32) NOT NULL,
294 `country-name` char(255) NOT NULL,
295 `gender` char(32) NOT NULL,
296 `marital` char(255) NOT NULL,
297 `showwith` tinyint(1) NOT NULL DEFAULT '0',
298 `with` text NOT NULL,
299 `sexual` char(255) NOT NULL,
300 `politic` char(255) NOT NULL,
301 `religion` char(255) NOT NULL,
302 `pub_keywords` text NOT NULL,
303 `prv_keywords` text NOT NULL,
304 `about` text NOT NULL,
305 `summary` char(255) NOT NULL,
306 `music` text NOT NULL,
307 `book` text NOT NULL,
309 `film` text NOT NULL,
310 `interest` text NOT NULL,
311 `romance` text NOT NULL,
312 `work` text NOT NULL,
313 `education` text NOT NULL,
314 `contact` text NOT NULL,
315 `homepage` char(255) NOT NULL,
316 `photo` char(255) NOT NULL,
317 `thumb` char(255) NOT NULL,
318 `publish` tinyint(1) NOT NULL DEFAULT '0',
319 `net-publish` tinyint(1) NOT NULL DEFAULT '0',
321 FULLTEXT KEY `pub_keywords` (`pub_keywords`),
322 FULLTEXT KEY `prv_keywords` (`prv_keywords`)
323 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
325 -- --------------------------------------------------------
328 -- Table structure for table `profile_check`
331 CREATE TABLE IF NOT EXISTS `profile_check` (
332 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
333 `uid` int(10) unsigned NOT NULL,
334 `cid` int(10) unsigned NOT NULL,
335 `dfrn_id` char(255) NOT NULL,
336 `sec` char(255) NOT NULL,
337 `expire` int(11) NOT NULL,
339 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
341 -- --------------------------------------------------------
344 -- Table structure for table `session`
347 CREATE TABLE IF NOT EXISTS `session` (
348 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
349 `sid` char(255) NOT NULL,
350 `data` text NOT NULL,
351 `expire` int(10) unsigned NOT NULL,
354 KEY `expire` (`expire`)
355 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
357 -- --------------------------------------------------------
360 -- Table structure for table `user`
363 CREATE TABLE IF NOT EXISTS `user` (
364 `uid` int(11) NOT NULL AUTO_INCREMENT,
365 `username` char(255) NOT NULL,
366 `password` char(255) NOT NULL,
367 `nickname` char(255) NOT NULL,
368 `email` char(255) NOT NULL,
369 `openid` char(255) NOT NULL,
370 `timezone` char(128) NOT NULL,
371 `language` char(32) NOT NULL DEFAULT 'en',
372 `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
373 `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
374 `default-location` char(255) NOT NULL,
375 `allow_location` tinyint(1) NOT NULL DEFAULT '0',
376 `theme` char(255) NOT NULL,
377 `pubkey` text NOT NULL,
378 `prvkey` text NOT NULL,
379 `spubkey` text NOT NULL,
380 `sprvkey` text NOT NULL,
381 `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
382 `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
383 `blockwall` tinyint(1) unsigned NOT NULL DEFAULT '0',
384 `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
385 `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
386 `pwdreset` char(255) NOT NULL,
387 `maxreq` int(11) NOT NULL DEFAULT '10',
388 `expire` int(11) unsigned NOT NULL DEFAULT '0',
389 `allow_cid` mediumtext NOT NULL,
390 `allow_gid` mediumtext NOT NULL,
391 `deny_cid` mediumtext NOT NULL,
392 `deny_gid` mediumtext NOT NULL,
393 `openidserver` text NOT NULL,
395 KEY `nickname` (`nickname`)
396 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
399 CREATE TABLE IF NOT EXISTS `register` (
400 `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
401 `hash` CHAR( 255 ) NOT NULL ,
402 `created` DATETIME NOT NULL ,
403 `uid` INT(11) UNSIGNED NOT NULL,
404 `password` CHAR(255) NOT NULL,
406 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
409 CREATE TABLE IF NOT EXISTS `clients` (
410 `client_id` VARCHAR( 20 ) NOT NULL ,
411 `pw` VARCHAR( 20 ) NOT NULL ,
412 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
413 PRIMARY KEY ( `client_id` )
414 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
416 CREATE TABLE IF NOT EXISTS `tokens` (
417 `id` VARCHAR( 40 ) NOT NULL ,
418 `client_id` VARCHAR( 20 ) NOT NULL ,
419 `expires` INT NOT NULL ,
420 `scope` VARCHAR( 200 ) NOT NULL ,
422 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
424 CREATE TABLE IF NOT EXISTS `auth_codes` (
425 `id` VARCHAR( 40 ) NOT NULL ,
426 `client_id` VARCHAR( 20 ) NOT NULL ,
427 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
428 `expires` INT NOT NULL ,
429 `scope` VARCHAR( 250 ) NOT NULL ,
431 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
433 CREATE TABLE IF NOT EXISTS `queue` (
434 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
436 `created` DATETIME NOT NULL ,
437 `last` DATETIME NOT NULL ,
438 `content` MEDIUMTEXT NOT NULL
439 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
441 CREATE TABLE IF NOT EXISTS `pconfig` (
442 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
443 `uid` INT NOT NULL DEFAULT '0',
444 `cat` CHAR( 255 ) NOT NULL ,
445 `k` CHAR( 255 ) NOT NULL ,
446 `v` MEDIUMTEXT NOT NULL
447 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
450 CREATE TABLE IF NOT EXISTS `hook` (
451 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
452 `hook` CHAR( 255 ) NOT NULL ,
453 `file` CHAR( 255 ) NOT NULL ,
454 `function` CHAR( 255 ) NOT NULL
455 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
458 CREATE TABLE IF NOT EXISTS `addon` (
459 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
460 `name` CHAR( 255 ) NOT NULL ,
461 `version` CHAR( 255 ) NOT NULL ,
462 `installed` TINYINT( 1 ) NOT NULL DEFAULT '0' ,
463 `timestamp` BIGINT NOT NULL DEFAULT '0'
464 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
467 CREATE TABLE IF NOT EXISTS `event` (
468 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
471 `created` DATETIME NOT NULL ,
472 `edited` DATETIME NOT NULL ,
473 `start` DATETIME NOT NULL ,
474 `finish` DATETIME NOT NULL ,
475 `desc` TEXT NOT NULL ,
476 `location` TEXT NOT NULL ,
477 `type` CHAR( 255 ) NOT NULL ,
478 `adjust` TINYINT( 1 ) NOT NULL DEFAULT '1',
479 `allow_cid` MEDIUMTEXT NOT NULL ,
480 `allow_gid` MEDIUMTEXT NOT NULL ,
481 `deny_cid` MEDIUMTEXT NOT NULL ,
482 `deny_gid` MEDIUMTEXT NOT NULL
483 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
485 CREATE TABLE IF NOT EXISTS `cache` (
486 `k` CHAR( 255 ) NOT NULL PRIMARY KEY ,
488 `updated` DATETIME NOT NULL
489 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
492 CREATE TABLE IF NOT EXISTS `fcontact` (
493 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
494 `url` CHAR( 255 ) NOT NULL ,
495 `name` CHAR( 255 ) NOT NULL ,
496 `photo` CHAR( 255 ) NOT NULL
497 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
499 CREATE TABLE IF NOT EXISTS `ffinder` (
500 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
501 `uid` INT UNSIGNED NOT NULL ,
502 `cid` INT UNSIGNED NOT NULL ,
503 `fid` INT UNSIGNED NOT NULL
504 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
507 CREATE TABLE IF NOT EXISTS `mailacct` (
508 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
510 `server` CHAR( 255 ) NOT NULL ,
511 `user` CHAR( 255 ) NOT NULL ,
512 `pass` CHAR( 255 ) NOT NULL ,
513 `reply_to` CHAR( 255 ) NOT NULL ,
514 `last_check` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
515 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
517 CREATE TABLE IF NOT EXISTS `attach` (
518 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
520 `filetype` CHAR( 64 ) NOT NULL ,
521 `filesize` INT NOT NULL ,
522 `data` LONGBLOB NOT NULL ,
523 `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
524 `edited` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
525 `allow_cid` MEDIUMTEXT NOT NULL ,
526 `allow_gid` MEDIUMTEXT NOT NULL ,
527 `deny_cid` MEDIUMTEXT NOT NULL ,
528 `deny_gid` MEDIUMTEXT NOT NULL
529 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;