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 `pending` tinyint(1) NOT NULL DEFAULT '1',
89 `rating` tinyint(1) NOT NULL DEFAULT '0',
90 `reason` text NOT NULL,
91 `info` mediumtext NOT NULL,
92 `profile-id` int(11) NOT NULL DEFAULT '0',
93 `bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag',
97 KEY `issued-id` (`issued-id`),
98 KEY `dfrn-id` (`dfrn-id`),
99 KEY `blocked` (`blocked`),
100 KEY `readonly` (`readonly`)
101 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
103 -- --------------------------------------------------------
106 -- Table structure for table `group`
109 CREATE TABLE IF NOT EXISTS `group` (
110 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
111 `uid` int(10) unsigned NOT NULL,
112 `deleted` tinyint(1) NOT NULL DEFAULT '0',
113 `name` char(255) NOT NULL,
115 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
117 -- --------------------------------------------------------
120 -- Table structure for table `group_member`
123 CREATE TABLE IF NOT EXISTS `group_member` (
124 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
125 `uid` int(10) unsigned NOT NULL,
126 `gid` int(10) unsigned NOT NULL,
127 `contact-id` int(10) unsigned NOT NULL,
129 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
131 -- --------------------------------------------------------
134 -- Table structure for table `intro`
137 CREATE TABLE IF NOT EXISTS `intro` (
138 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
139 `uid` int(10) unsigned NOT NULL,
140 `contact-id` int(11) NOT NULL,
141 `knowyou` tinyint(1) NOT NULL,
142 `duplex` tinyint(1) NOT NULL DEFAULT '0',
143 `note` text NOT NULL,
144 `hash` char(255) NOT NULL,
145 `datetime` datetime NOT NULL,
146 `blocked` tinyint(1) NOT NULL DEFAULT '1',
147 `ignore` tinyint(1) NOT NULL DEFAULT '0',
149 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
151 -- --------------------------------------------------------
154 -- Table structure for table `item`
157 CREATE TABLE IF NOT EXISTS `item` (
158 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
159 `uri` char(255) NOT NULL,
160 `uid` int(10) unsigned NOT NULL DEFAULT '0',
161 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
162 `type` char(255) NOT NULL,
163 `wall` tinyint(1) NOT NULL DEFAULT '0',
164 `gravity` tinyint(1) NOT NULL DEFAULT '0',
165 `parent` int(10) unsigned NOT NULL DEFAULT '0',
166 `parent-uri` char(255) NOT NULL,
167 `thr-parent` char(255) NOT NULL,
168 `created` datetime NOT NULL,
169 `edited` datetime NOT NULL,
170 `changed` datetime NOT NULL,
171 `owner-name` char(255) NOT NULL,
172 `owner-link` char(255) NOT NULL,
173 `owner-avatar` char(255) NOT NULL,
174 `author-name` char(255) NOT NULL,
175 `author-link` char(255) NOT NULL,
176 `author-avatar` char(255) NOT NULL,
177 `title` char(255) NOT NULL,
178 `body` mediumtext NOT NULL,
179 `verb` char(255) NOT NULL,
180 `object-type` char(255) NOT NULL,
181 `object` text NOT NULL,
182 `target-type` char(255) NOT NULL,
183 `target` text NOT NULL,
184 `plink` char(255) NOT NULL,
185 `resource-id` char(255) NOT NULL,
186 `tag` mediumtext NOT NULL,
187 `inform` mediumtext NOT NULL,
188 `location` char(255) NOT NULL,
189 `coord` char(255) NOT NULL,
190 `allow_cid` mediumtext NOT NULL,
191 `allow_gid` mediumtext NOT NULL,
192 `deny_cid` mediumtext NOT NULL,
193 `deny_gid` mediumtext NOT NULL,
194 `private` tinyint(1) NOT NULL DEFAULT '0',
195 `visible` tinyint(1) NOT NULL DEFAULT '0',
196 `unseen` tinyint(1) NOT NULL DEFAULT '1',
197 `deleted` tinyint(1) NOT NULL DEFAULT '0',
198 `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
202 KEY `contact-id` (`contact-id`),
205 KEY `parent` (`parent`),
206 KEY `parent-uri` (`parent-uri`),
207 KEY `created` (`created`),
208 KEY `edited` (`edited`),
209 KEY `visible` (`visible`),
210 KEY `deleted` (`deleted`),
211 KEY `last-child` (`last-child`),
212 KEY `unseen` (`unseen`),
213 FULLTEXT KEY `title` (`title`),
214 FULLTEXT KEY `body` (`body`),
215 FULLTEXT KEY `allow_cid` (`allow_cid`),
216 FULLTEXT KEY `allow_gid` (`allow_gid`),
217 FULLTEXT KEY `deny_cid` (`deny_cid`),
218 FULLTEXT KEY `deny_gid` (`deny_gid`)
219 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
221 -- --------------------------------------------------------
224 -- Table structure for table `mail`
227 CREATE TABLE IF NOT EXISTS `mail` (
228 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
229 `uid` int(10) unsigned NOT NULL,
230 `from-name` char(255) NOT NULL,
231 `from-photo` char(255) NOT NULL,
232 `from-url` char(255) NOT NULL,
233 `contact-id` char(255) NOT NULL,
234 `title` char(255) NOT NULL,
235 `body` text NOT NULL,
236 `seen` tinyint(1) NOT NULL,
237 `replied` tinyint(1) NOT NULL,
238 `uri` char(255) NOT NULL,
239 `parent-uri` char(255) NOT NULL,
240 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
242 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
244 -- --------------------------------------------------------
247 -- Table structure for table `photo`
250 CREATE TABLE IF NOT EXISTS `photo` (
251 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
252 `uid` int(10) unsigned NOT NULL,
253 `contact-id` int(10) unsigned NOT NULL,
254 `resource-id` char(255) NOT NULL,
255 `created` datetime NOT NULL,
256 `edited` datetime NOT NULL,
257 `title` char(255) NOT NULL,
258 `desc` text NOT NULL,
259 `album` char(255) NOT NULL,
260 `filename` char(255) NOT NULL,
261 `height` smallint(6) NOT NULL,
262 `width` smallint(6) NOT NULL,
263 `data` mediumblob NOT NULL,
264 `scale` tinyint(3) NOT NULL,
265 `profile` tinyint(1) NOT NULL DEFAULT '0',
266 `allow_cid` mediumtext NOT NULL,
267 `allow_gid` mediumtext NOT NULL,
268 `deny_cid` mediumtext NOT NULL,
269 `deny_gid` mediumtext NOT NULL,
271 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
273 -- --------------------------------------------------------
276 -- Table structure for table `profile`
279 CREATE TABLE IF NOT EXISTS `profile` (
280 `id` int(11) NOT NULL AUTO_INCREMENT,
281 `uid` int(11) NOT NULL,
282 `profile-name` char(255) NOT NULL,
283 `is-default` tinyint(1) NOT NULL DEFAULT '0',
284 `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
285 `name` char(255) NOT NULL,
286 `pdesc` char(255) NOT NULL,
287 `dob` char(32) NOT NULL DEFAULT '0000-00-00',
288 `address` char(255) NOT NULL,
289 `locality` char(255) NOT NULL,
290 `region` char(255) NOT NULL,
291 `postal-code` char(32) NOT NULL,
292 `country-name` char(255) NOT NULL,
293 `gender` char(32) NOT NULL,
294 `marital` char(255) NOT NULL,
295 `showwith` tinyint(1) NOT NULL DEFAULT '0',
296 `with` text NOT NULL,
297 `sexual` char(255) NOT NULL,
298 `politic` char(255) NOT NULL,
299 `religion` char(255) NOT NULL,
300 `keywords` text NOT NULL,
301 `about` text NOT NULL,
302 `summary` char(255) NOT NULL,
303 `music` text NOT NULL,
304 `book` text NOT NULL,
306 `film` text NOT NULL,
307 `interest` text NOT NULL,
308 `romance` text NOT NULL,
309 `work` text NOT NULL,
310 `education` text NOT NULL,
311 `contact` text NOT NULL,
312 `homepage` char(255) NOT NULL,
313 `photo` char(255) NOT NULL,
314 `thumb` char(255) NOT NULL,
315 `publish` tinyint(1) NOT NULL DEFAULT '0',
316 `net-publish` tinyint(1) NOT NULL DEFAULT '0',
318 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
320 -- --------------------------------------------------------
323 -- Table structure for table `profile_check`
326 CREATE TABLE IF NOT EXISTS `profile_check` (
327 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
328 `uid` int(10) unsigned NOT NULL,
329 `cid` int(10) unsigned NOT NULL,
330 `dfrn_id` char(255) NOT NULL,
331 `sec` char(255) NOT NULL,
332 `expire` int(11) NOT NULL,
334 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
336 -- --------------------------------------------------------
339 -- Table structure for table `session`
342 CREATE TABLE IF NOT EXISTS `session` (
343 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
344 `sid` char(255) NOT NULL,
345 `data` text NOT NULL,
346 `expire` int(10) unsigned NOT NULL,
349 KEY `expire` (`expire`)
350 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
352 -- --------------------------------------------------------
355 -- Table structure for table `user`
358 CREATE TABLE IF NOT EXISTS `user` (
359 `uid` int(11) NOT NULL AUTO_INCREMENT,
360 `username` char(255) NOT NULL,
361 `password` char(255) NOT NULL,
362 `nickname` char(255) NOT NULL,
363 `email` char(255) NOT NULL,
364 `openid` char(255) NOT NULL,
365 `timezone` char(128) NOT NULL,
366 `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
367 `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
368 `default-location` char(255) NOT NULL,
369 `allow_location` tinyint(1) NOT NULL DEFAULT '0',
370 `theme` char(255) NOT NULL,
371 `pubkey` text NOT NULL,
372 `prvkey` text NOT NULL,
373 `spubkey` text NOT NULL,
374 `sprvkey` text NOT NULL,
375 `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
376 `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
377 `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
378 `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
379 `pwdreset` char(255) NOT NULL,
380 `maxreq` int(11) NOT NULL DEFAULT '10',
381 `allow_cid` mediumtext NOT NULL,
382 `allow_gid` mediumtext NOT NULL,
383 `deny_cid` mediumtext NOT NULL,
384 `deny_gid` mediumtext NOT NULL,
385 `openidserver` text NOT NULL,
387 KEY `nickname` (`nickname`)
388 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
391 CREATE TABLE IF NOT EXISTS `register` (
392 `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
393 `hash` CHAR( 255 ) NOT NULL ,
394 `created` DATETIME NOT NULL ,
395 `uid` INT(11) UNSIGNED NOT NULL,
396 `password` CHAR(255) NOT NULL,
398 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
401 CREATE TABLE IF NOT EXISTS `clients` (
402 `client_id` VARCHAR( 20 ) NOT NULL ,
403 `pw` VARCHAR( 20 ) NOT NULL ,
404 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
405 PRIMARY KEY ( `client_id` )
406 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
408 CREATE TABLE IF NOT EXISTS `tokens` (
409 `id` VARCHAR( 40 ) NOT NULL ,
410 `client_id` VARCHAR( 20 ) NOT NULL ,
411 `expires` INT NOT NULL ,
412 `scope` VARCHAR( 200 ) NOT NULL ,
414 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
416 CREATE TABLE IF NOT EXISTS `auth_codes` (
417 `id` VARCHAR( 40 ) NOT NULL ,
418 `client_id` VARCHAR( 20 ) NOT NULL ,
419 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
420 `expires` INT NOT NULL ,
421 `scope` VARCHAR( 250 ) NOT NULL ,
423 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
425 CREATE TABLE IF NOT EXISTS `queue` (
426 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
428 `created` DATETIME NOT NULL ,
429 `last` DATETIME NOT NULL ,
430 `content` MEDIUMTEXT NOT NULL
431 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
433 CREATE TABLE IF NOT EXISTS `pconfig` (
434 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
435 `uid` INT NOT NULL DEFAULT '0',
436 `cat` CHAR( 255 ) NOT NULL ,
437 `k` CHAR( 255 ) NOT NULL ,
438 `v` MEDIUMTEXT NOT NULL
439 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
442 CREATE TABLE IF NOT EXISTS `hook` (
443 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
444 `hook` CHAR( 255 ) NOT NULL ,
445 `file` CHAR( 255 ) NOT NULL ,
446 `function` CHAR( 255 ) NOT NULL
447 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
450 CREATE TABLE IF NOT EXISTS `addon` (
451 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
452 `name` CHAR( 255 ) NOT NULL ,
453 `version` CHAR( 255 ) NOT NULL ,
454 `installed` TINYINT( 1 ) NOT NULL DEFAULT '0' ,
455 `timestamp` BIGINT NOT NULL DEFAULT '0'
456 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
459 CREATE TABLE IF NOT EXISTS `event` (
460 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
463 `created` DATETIME NOT NULL ,
464 `edited` DATETIME NOT NULL ,
465 `start` DATETIME NOT NULL ,
466 `finish` DATETIME NOT NULL ,
467 `desc` TEXT NOT NULL ,
468 `location` TEXT NOT NULL ,
469 `type` CHAR( 255 ) NOT NULL ,
470 `adjust` TINYINT( 1 ) NOT NULL DEFAULT '1',
471 `allow_cid` MEDIUMTEXT NOT NULL ,
472 `allow_gid` MEDIUMTEXT NOT NULL ,
473 `deny_cid` MEDIUMTEXT NOT NULL ,
474 `deny_gid` MEDIUMTEXT NOT NULL
475 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
477 CREATE TABLE IF NOT EXISTS `cache` (
478 `k` CHAR( 255 ) NOT NULL PRIMARY KEY ,
480 `updated` DATETIME NOT NULL
481 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;