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 `profile-id` int(11) NOT NULL DEFAULT '0',
94 KEY `issued-id` (`issued-id`),
95 KEY `dfrn-id` (`dfrn-id`),
96 KEY `blocked` (`blocked`),
97 KEY `readonly` (`readonly`)
98 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
100 -- --------------------------------------------------------
103 -- Table structure for table `group`
106 CREATE TABLE IF NOT EXISTS `group` (
107 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
108 `uid` int(10) unsigned NOT NULL,
109 `deleted` tinyint(1) NOT NULL DEFAULT '0',
110 `name` char(255) NOT NULL,
112 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
114 -- --------------------------------------------------------
117 -- Table structure for table `group_member`
120 CREATE TABLE IF NOT EXISTS `group_member` (
121 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
122 `uid` int(10) unsigned NOT NULL,
123 `gid` int(10) unsigned NOT NULL,
124 `contact-id` int(10) unsigned NOT NULL,
126 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
128 -- --------------------------------------------------------
131 -- Table structure for table `intro`
134 CREATE TABLE IF NOT EXISTS `intro` (
135 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
136 `uid` int(10) unsigned NOT NULL,
137 `contact-id` int(11) NOT NULL,
138 `knowyou` tinyint(1) NOT NULL,
139 `duplex` tinyint(1) NOT NULL DEFAULT '0',
140 `note` text NOT NULL,
141 `hash` char(255) NOT NULL,
142 `datetime` datetime NOT NULL,
143 `blocked` tinyint(1) NOT NULL DEFAULT '1',
144 `ignore` tinyint(1) NOT NULL DEFAULT '0',
146 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
148 -- --------------------------------------------------------
151 -- Table structure for table `item`
154 CREATE TABLE IF NOT EXISTS `item` (
155 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
156 `uri` char(255) CHARACTER SET ascii NOT NULL,
157 `uid` int(10) unsigned NOT NULL DEFAULT '0',
158 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
159 `type` char(255) NOT NULL,
160 `wall` tinyint(1) NOT NULL DEFAULT '0',
161 `gravity` tinyint(1) NOT NULL DEFAULT '0',
162 `parent` int(10) unsigned NOT NULL DEFAULT '0',
163 `parent-uri` char(255) CHARACTER SET ascii NOT NULL,
164 `created` datetime NOT NULL,
165 `edited` datetime NOT NULL,
166 `changed` datetime NOT NULL,
167 `owner-name` char(255) NOT NULL,
168 `owner-link` char(255) NOT NULL,
169 `owner-avatar` char(255) NOT NULL,
170 `author-name` char(255) NOT NULL,
171 `author-link` char(255) NOT NULL,
172 `author-avatar` char(255) NOT NULL,
173 `title` char(255) NOT NULL,
174 `body` mediumtext NOT NULL,
175 `verb` char(255) NOT NULL,
176 `object-type` char(255) NOT NULL,
177 `object` text NOT NULL,
178 `target-type` char(255) NOT NULL,
179 `target` text NOT NULL,
180 `resource-id` char(255) NOT NULL,
181 `tag` mediumtext NOT NULL,
182 `inform` mediumtext NOT NULL,
183 `location` char(255) NOT NULL,
184 `coord` char(255) NOT NULL,
185 `allow_cid` mediumtext NOT NULL,
186 `allow_gid` mediumtext NOT NULL,
187 `deny_cid` mediumtext NOT NULL,
188 `deny_gid` mediumtext NOT NULL,
189 `visible` tinyint(1) NOT NULL DEFAULT '0',
190 `unseen` tinyint(1) NOT NULL DEFAULT '1',
191 `deleted` tinyint(1) NOT NULL DEFAULT '0',
192 `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
196 KEY `contact-id` (`contact-id`),
199 KEY `parent` (`parent`),
200 KEY `parent-uri` (`parent-uri`),
201 KEY `created` (`created`),
202 KEY `edited` (`edited`),
203 KEY `visible` (`visible`),
204 KEY `deleted` (`deleted`),
205 KEY `last-child` (`last-child`),
206 KEY `unseen` (`unseen`),
207 FULLTEXT KEY `title` (`title`),
208 FULLTEXT KEY `body` (`body`),
209 FULLTEXT KEY `allow_cid` (`allow_cid`),
210 FULLTEXT KEY `allow_gid` (`allow_gid`),
211 FULLTEXT KEY `deny_cid` (`deny_cid`),
212 FULLTEXT KEY `deny_gid` (`deny_gid`)
213 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
215 -- --------------------------------------------------------
218 -- Table structure for table `mail`
221 CREATE TABLE IF NOT EXISTS `mail` (
222 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
223 `uid` int(10) unsigned NOT NULL,
224 `from-name` char(255) NOT NULL,
225 `from-photo` char(255) NOT NULL,
226 `from-url` char(255) NOT NULL,
227 `contact-id` char(255) NOT NULL,
228 `title` char(255) NOT NULL,
229 `body` text NOT NULL,
230 `seen` tinyint(1) NOT NULL,
231 `replied` tinyint(1) NOT NULL,
232 `uri` char(255) NOT NULL,
233 `parent-uri` char(255) NOT NULL,
234 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
236 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
238 -- --------------------------------------------------------
241 -- Table structure for table `photo`
244 CREATE TABLE IF NOT EXISTS `photo` (
245 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
246 `uid` int(10) unsigned NOT NULL,
247 `contact-id` int(10) unsigned NOT NULL,
248 `resource-id` char(255) NOT NULL,
249 `created` datetime NOT NULL,
250 `edited` datetime NOT NULL,
251 `title` char(255) NOT NULL,
252 `desc` text NOT NULL,
253 `album` char(255) NOT NULL,
254 `filename` char(255) NOT NULL,
255 `height` smallint(6) NOT NULL,
256 `width` smallint(6) NOT NULL,
257 `data` mediumblob NOT NULL,
258 `scale` tinyint(3) NOT NULL,
259 `profile` tinyint(1) NOT NULL DEFAULT '0',
260 `allow_cid` mediumtext NOT NULL,
261 `allow_gid` mediumtext NOT NULL,
262 `deny_cid` mediumtext NOT NULL,
263 `deny_gid` mediumtext NOT NULL,
265 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
267 -- --------------------------------------------------------
270 -- Table structure for table `profile`
273 CREATE TABLE IF NOT EXISTS `profile` (
274 `id` int(11) NOT NULL AUTO_INCREMENT,
275 `uid` int(11) NOT NULL,
276 `profile-name` char(255) NOT NULL,
277 `is-default` tinyint(1) NOT NULL DEFAULT '0',
278 `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
279 `name` char(255) NOT NULL,
280 `dob` char(32) NOT NULL DEFAULT '0000-00-00',
281 `address` char(255) NOT NULL,
282 `locality` char(255) NOT NULL,
283 `region` char(255) NOT NULL,
284 `postal-code` char(32) NOT NULL,
285 `country-name` char(255) NOT NULL,
286 `gender` char(32) NOT NULL,
287 `marital` char(255) NOT NULL,
288 `with` text NOT NULL,
289 `sexual` char(255) NOT NULL,
290 `politic` char(255) NOT NULL,
291 `religion` char(255) NOT NULL,
292 `about` text NOT NULL,
293 `summary` char(255) NOT NULL,
294 `music` text NOT NULL,
295 `book` text NOT NULL,
297 `film` text NOT NULL,
298 `interest` text NOT NULL,
299 `romance` text NOT NULL,
300 `work` text NOT NULL,
301 `education` text NOT NULL,
302 `contact` text NOT NULL,
303 `homepage` char(255) NOT NULL,
304 `photo` char(255) NOT NULL,
305 `thumb` char(255) NOT NULL,
306 `publish` tinyint(1) NOT NULL DEFAULT '0',
307 `net-publish` tinyint(1) NOT NULL DEFAULT '0',
309 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
311 -- --------------------------------------------------------
314 -- Table structure for table `profile_check`
317 CREATE TABLE IF NOT EXISTS `profile_check` (
318 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
319 `uid` int(10) unsigned NOT NULL,
320 `dfrn_id` char(255) NOT NULL,
321 `expire` int(11) NOT NULL,
323 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
325 -- --------------------------------------------------------
328 -- Table structure for table `session`
331 CREATE TABLE IF NOT EXISTS `session` (
332 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
333 `sid` char(255) NOT NULL,
334 `data` text NOT NULL,
335 `expire` int(10) unsigned NOT NULL,
338 KEY `expire` (`expire`)
339 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
341 -- --------------------------------------------------------
344 -- Table structure for table `user`
347 CREATE TABLE IF NOT EXISTS `user` (
348 `uid` int(11) NOT NULL AUTO_INCREMENT,
349 `username` char(255) NOT NULL,
350 `password` char(255) NOT NULL,
351 `nickname` char(255) NOT NULL,
352 `email` char(255) NOT NULL,
353 `openid` char(255) NOT NULL,
354 `timezone` char(128) NOT NULL,
355 `default-location` char(255) NOT NULL,
356 `allow_location` tinyint(1) NOT NULL DEFAULT '0',
357 `theme` char(255) NOT NULL,
358 `pubkey` text NOT NULL,
359 `prvkey` text NOT NULL,
360 `spubkey` text NOT NULL,
361 `sprvkey` text NOT NULL,
362 `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
363 `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
364 `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
365 `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
366 `pwdreset` char(255) NOT NULL,
367 `allow_cid` mediumtext NOT NULL,
368 `allow_gid` mediumtext NOT NULL,
369 `deny_cid` mediumtext NOT NULL,
370 `deny_gid` mediumtext NOT NULL,
372 KEY `nickname` (`nickname`)
373 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
376 CREATE TABLE IF NOT EXISTS `register` (
377 `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
378 `hash` CHAR( 255 ) NOT NULL ,
379 `created` DATETIME NOT NULL ,
380 `uid` INT(11) UNSIGNED NOT NULL,
381 `password` CHAR(255) NOT NULL,
383 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
386 CREATE TABLE IF NOT EXISTS `clients` (
387 `client_id` VARCHAR( 20 ) NOT NULL ,
388 `pw` VARCHAR( 20 ) NOT NULL ,
389 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
390 PRIMARY KEY ( `client_id` )
391 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
393 CREATE TABLE IF NOT EXISTS `tokens` (
394 `id` VARCHAR( 40 ) NOT NULL ,
395 `client_id` VARCHAR( 20 ) NOT NULL ,
396 `expires` INT NOT NULL ,
397 `scope` VARCHAR( 200 ) NOT NULL ,
399 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
401 CREATE TABLE IF NOT EXISTS `auth_codes` (
402 `id` VARCHAR( 40 ) NOT NULL ,
403 `client_id` VARCHAR( 20 ) NOT NULL ,
404 `redirect_uri` VARCHAR( 200 ) NOT NULL ,
405 `expires` INT NOT NULL ,
406 `scope` VARCHAR( 250 ) NOT NULL ,
408 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;
410 CREATE TABLE IF NOT EXISTS `queue` (
411 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
413 `created` DATETIME NOT NULL ,
414 `last` DATETIME NOT NULL ,
415 `content` MEDIUMTEXT NOT NULL
416 ) ENGINE = MYISAM DEFAULT CHARSET=utf8;