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 `lrdd` 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 `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
81 `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
82 `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
83 `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
84 `priority` tinyint(3) NOT NULL,
85 `blocked` tinyint(1) NOT NULL DEFAULT '1',
86 `readonly` tinyint(1) NOT NULL DEFAULT '0',
87 `pending` tinyint(1) NOT NULL DEFAULT '1',
88 `rating` tinyint(1) NOT NULL DEFAULT '0',
89 `reason` text NOT NULL,
90 `info` MEDIUMTEXT NOT NULL AFTER `reason`,
91 `profile-id` int(11) NOT NULL DEFAULT '0',
95 KEY `issued-id` (`issued-id`),
96 KEY `dfrn-id` (`dfrn-id`),
97 KEY `blocked` (`blocked`),
98 KEY `readonly` (`readonly`)
99 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
101 -- --------------------------------------------------------
104 -- Table structure for table `group`
107 CREATE TABLE IF NOT EXISTS `group` (
108 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
109 `uid` int(10) unsigned NOT NULL,
110 `deleted` tinyint(1) NOT NULL DEFAULT '0',
111 `name` char(255) NOT NULL,
113 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
115 -- --------------------------------------------------------
118 -- Table structure for table `group_member`
121 CREATE TABLE IF NOT EXISTS `group_member` (
122 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
123 `uid` int(10) unsigned NOT NULL,
124 `gid` int(10) unsigned NOT NULL,
125 `contact-id` int(10) unsigned NOT NULL,
127 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
129 -- --------------------------------------------------------
132 -- Table structure for table `intro`
135 CREATE TABLE IF NOT EXISTS `intro` (
136 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
137 `uid` int(10) unsigned NOT NULL,
138 `contact-id` int(11) NOT NULL,
139 `knowyou` tinyint(1) NOT NULL,
140 `duplex` tinyint(1) NOT NULL DEFAULT '0',
141 `note` text NOT NULL,
142 `hash` char(255) NOT NULL,
143 `datetime` datetime NOT NULL,
144 `blocked` tinyint(1) NOT NULL DEFAULT '1',
145 `ignore` tinyint(1) NOT NULL DEFAULT '0',
147 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
149 -- --------------------------------------------------------
152 -- Table structure for table `item`
155 CREATE TABLE IF NOT EXISTS `item` (
156 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
157 `uri` char(255) NOT NULL,
158 `uid` int(10) unsigned NOT NULL DEFAULT '0',
159 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
160 `type` char(255) NOT NULL,
161 `wall` tinyint(1) NOT NULL DEFAULT '0',
162 `gravity` tinyint(1) NOT NULL DEFAULT '0',
163 `parent` int(10) unsigned NOT NULL DEFAULT '0',
164 `parent-uri` char(255) NOT NULL,
165 `thr-parent` char(255) NOT NULL,
166 `created` datetime NOT NULL,
167 `edited` datetime NOT NULL,
168 `changed` datetime NOT NULL,
169 `owner-name` char(255) NOT NULL,
170 `owner-link` char(255) NOT NULL,
171 `owner-avatar` char(255) NOT NULL,
172 `author-name` char(255) NOT NULL,
173 `author-link` char(255) NOT NULL,
174 `author-avatar` char(255) NOT NULL,
175 `title` char(255) NOT NULL,
176 `body` mediumtext NOT NULL,
177 `verb` char(255) NOT NULL,
178 `object-type` char(255) NOT NULL,
179 `object` text NOT NULL,
180 `target-type` char(255) NOT NULL,
181 `target` text NOT NULL,
182 `resource-id` char(255) NOT NULL,
183 `tag` mediumtext NOT NULL,
184 `inform` mediumtext NOT NULL,
185 `location` char(255) NOT NULL,
186 `coord` char(255) NOT NULL,
187 `allow_cid` mediumtext NOT NULL,
188 `allow_gid` mediumtext NOT NULL,
189 `deny_cid` mediumtext NOT NULL,
190 `deny_gid` mediumtext NOT NULL,
191 `private` tinyint(1) NOT NULL DEFAULT '0',
192 `visible` tinyint(1) NOT NULL DEFAULT '0',
193 `unseen` tinyint(1) NOT NULL DEFAULT '1',
194 `deleted` tinyint(1) NOT NULL DEFAULT '0',
195 `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
199 KEY `contact-id` (`contact-id`),
202 KEY `parent` (`parent`),
203 KEY `parent-uri` (`parent-uri`),
204 KEY `created` (`created`),
205 KEY `edited` (`edited`),
206 KEY `visible` (`visible`),
207 KEY `deleted` (`deleted`),
208 KEY `last-child` (`last-child`),
209 KEY `unseen` (`unseen`),
210 FULLTEXT KEY `title` (`title`),
211 FULLTEXT KEY `body` (`body`),
212 FULLTEXT KEY `allow_cid` (`allow_cid`),
213 FULLTEXT KEY `allow_gid` (`allow_gid`),
214 FULLTEXT KEY `deny_cid` (`deny_cid`),
215 FULLTEXT KEY `deny_gid` (`deny_gid`)
216 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
218 -- --------------------------------------------------------
221 -- Table structure for table `mail`
224 CREATE TABLE IF NOT EXISTS `mail` (
225 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
226 `uid` int(10) unsigned NOT NULL,
227 `from-name` char(255) NOT NULL,
228 `from-photo` char(255) NOT NULL,
229 `from-url` char(255) NOT NULL,
230 `contact-id` char(255) NOT NULL,
231 `title` char(255) NOT NULL,
232 `body` text NOT NULL,
233 `seen` tinyint(1) NOT NULL,
234 `replied` tinyint(1) NOT NULL,
235 `uri` char(255) NOT NULL,
236 `parent-uri` char(255) NOT NULL,
237 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
239 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
241 -- --------------------------------------------------------
244 -- Table structure for table `photo`
247 CREATE TABLE IF NOT EXISTS `photo` (
248 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
249 `uid` int(10) unsigned NOT NULL,
250 `contact-id` int(10) unsigned NOT NULL,
251 `resource-id` char(255) NOT NULL,
252 `created` datetime NOT NULL,
253 `edited` datetime NOT NULL,
254 `title` char(255) NOT NULL,
255 `desc` text NOT NULL,
256 `album` char(255) NOT NULL,
257 `filename` char(255) NOT NULL,
258 `height` smallint(6) NOT NULL,
259 `width` smallint(6) NOT NULL,
260 `data` mediumblob NOT NULL,
261 `scale` tinyint(3) NOT NULL,
262 `profile` tinyint(1) NOT NULL DEFAULT '0',
263 `allow_cid` mediumtext NOT NULL,
264 `allow_gid` mediumtext NOT NULL,
265 `deny_cid` mediumtext NOT NULL,
266 `deny_gid` mediumtext NOT NULL,
268 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
270 -- --------------------------------------------------------
273 -- Table structure for table `profile`
276 CREATE TABLE IF NOT EXISTS `profile` (
277 `id` int(11) NOT NULL AUTO_INCREMENT,
278 `uid` int(11) NOT NULL,
279 `profile-name` char(255) NOT NULL,
280 `is-default` tinyint(1) NOT NULL DEFAULT '0',
281 `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
282 `name` char(255) NOT NULL,
283 `dob` char(32) NOT NULL DEFAULT '0000-00-00',
284 `address` char(255) NOT NULL,
285 `locality` char(255) NOT NULL,
286 `region` char(255) NOT NULL,
287 `postal-code` char(32) NOT NULL,
288 `country-name` char(255) NOT NULL,
289 `gender` char(32) NOT NULL,
290 `marital` char(255) NOT NULL,
291 `showwith` tinyint(1) NOT NULL DEFAULT '0',
292 `with` text NOT NULL,
293 `sexual` char(255) NOT NULL,
294 `politic` char(255) NOT NULL,
295 `religion` char(255) NOT NULL,
296 `keywords` text NOT NULL,
297 `about` text NOT NULL,
298 `summary` char(255) NOT NULL,
299 `music` text NOT NULL,
300 `book` text NOT NULL,
302 `film` text NOT NULL,
303 `interest` text NOT NULL,
304 `romance` text NOT NULL,
305 `work` text NOT NULL,
306 `education` text NOT NULL,
307 `contact` text NOT NULL,
308 `homepage` char(255) NOT NULL,
309 `photo` char(255) NOT NULL,
310 `thumb` char(255) NOT NULL,
311 `publish` tinyint(1) NOT NULL DEFAULT '0',
312 `net-publish` tinyint(1) NOT NULL DEFAULT '0',
314 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
316 -- --------------------------------------------------------
319 -- Table structure for table `profile_check`
322 CREATE TABLE IF NOT EXISTS `profile_check` (
323 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
324 `uid` int(10) unsigned NOT NULL,
325 `cid` int(10) unsigned NOT NULL,
326 `dfrn_id` char(255) NOT NULL,
327 `sec` char(255) NOT NULL,
328 `expire` int(11) NOT NULL,
330 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
332 -- --------------------------------------------------------
335 -- Table structure for table `session`
338 CREATE TABLE IF NOT EXISTS `session` (
339 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
340 `sid` char(255) NOT NULL,
341 `data` text NOT NULL,
342 `expire` int(10) unsigned NOT NULL,
345 KEY `expire` (`expire`)
346 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
348 -- --------------------------------------------------------
351 -- Table structure for table `user`
354 CREATE TABLE IF NOT EXISTS `user` (
355 `uid` int(11) NOT NULL AUTO_INCREMENT,
356 `username` char(255) NOT NULL,
357 `password` char(255) NOT NULL,
358 `nickname` char(255) NOT NULL,
359 `email` char(255) NOT NULL,
360 `openid` char(255) NOT NULL,
361 `timezone` char(128) NOT NULL,
362 `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
363 `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
364 `default-location` char(255) NOT NULL,
365 `allow_location` tinyint(1) NOT NULL DEFAULT '0',
366 `theme` char(255) NOT NULL,
367 `pubkey` text NOT NULL,
368 `prvkey` text NOT NULL,
369 `spubkey` text NOT NULL,
370 `sprvkey` text NOT NULL,
371 `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
372 `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
373 `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
374 `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
375 `pwdreset` char(255) NOT NULL,
376 `maxreq` int(11) NOT NULL DEFAULT '10',
377 `allow_cid` mediumtext NOT NULL,
378 `allow_gid` mediumtext NOT NULL,
379 `deny_cid` mediumtext NOT NULL,
380 `deny_gid` mediumtext NOT NULL,
381 `openidserver` text NOT NULL,
383 KEY `nickname` (`nickname`)
384 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
387 CREATE TABLE IF NOT EXISTS `register` (
388 `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
389 `hash` CHAR( 255 ) NOT NULL ,
390 `created` DATETIME NOT NULL ,
391 `uid` INT(11) UNSIGNED NOT NULL,
392 `password` CHAR(255) NOT NULL,
394 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
397 CREATE TABLE IF NOT EXISTS `clients` (
398 `client_id` VARCHAR( 20 ) NOT NULL ,
399 `pw` VARCHAR( 20 ) NOT NULL ,
400 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
401 PRIMARY KEY ( `client_id` )
402 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
404 CREATE TABLE IF NOT EXISTS `tokens` (
405 `id` VARCHAR( 40 ) NOT NULL ,
406 `client_id` VARCHAR( 20 ) NOT NULL ,
407 `expires` INT NOT NULL ,
408 `scope` VARCHAR( 200 ) NOT NULL ,
410 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
412 CREATE TABLE IF NOT EXISTS `auth_codes` (
413 `id` VARCHAR( 40 ) NOT NULL ,
414 `client_id` VARCHAR( 20 ) NOT NULL ,
415 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
416 `expires` INT NOT NULL ,
417 `scope` VARCHAR( 250 ) NOT NULL ,
419 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
421 CREATE TABLE IF NOT EXISTS `queue` (
422 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
424 `created` DATETIME NOT NULL ,
425 `last` DATETIME NOT NULL ,
426 `content` MEDIUMTEXT NOT NULL
427 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
429 CREATE TABLE IF NOT EXISTS `pconfig` (
430 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
431 `uid` INT NOT NULL DEFAULT '0',
432 `cat` CHAR( 255 ) NOT NULL ,
433 `k` CHAR( 255 ) NOT NULL ,
434 `v` MEDIUMTEXT NOT NULL
435 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
438 CREATE TABLE IF NOT EXISTS `hook` (
439 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
440 `hook` CHAR( 255 ) NOT NULL ,
441 `file` CHAR( 255 ) NOT NULL ,
442 `function` CHAR( 255 ) NOT NULL
443 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
446 CREATE TABLE IF NOT EXISTS `addon` (
447 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
448 `name` CHAR( 255 ) NOT NULL ,
449 `version` CHAR( 255 ) NOT NULL ,
450 `installed` TINYINT( 1 ) NOT NULL DEFAULT '0'
451 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;