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 */;
15 -- --------------------------------------------------------
18 -- Table structure for table `challenge`
21 CREATE TABLE IF NOT EXISTS `challenge` (
22 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
23 `challenge` char(255) NOT NULL,
24 `dfrn-id` char(255) NOT NULL,
25 `expire` int(11) NOT NULL,
27 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
29 -- --------------------------------------------------------
32 -- Table structure for table `contact`
35 CREATE TABLE IF NOT EXISTS `contact` (
36 `id` int(11) NOT NULL AUTO_INCREMENT,
37 `uid` int(11) NOT NULL COMMENT 'owner uid',
38 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
39 `self` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'boolean 1 == info for local UID, primarily name and photo to use in item displays.',
40 `name` char(255) NOT NULL,
41 `photo` text NOT NULL COMMENT 'remote photo URL initially until approved',
42 `thumb` text NOT NULL,
43 `site-pubkey` text NOT NULL,
44 `issued-id` char(255) NOT NULL,
45 `dfrn-id` char(255) NOT NULL,
46 `url` char(255) NOT NULL,
47 `issued-pubkey` char(255) NOT NULL,
48 `pubkey` text NOT NULL,
49 `prvkey` text NOT NULL,
50 `request` text NOT NULL,
51 `notify` text NOT NULL,
53 `confirm` text NOT NULL,
54 `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
55 `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
56 `ret-id` char(255) NOT NULL,
57 `ret-pubkey` text NOT NULL,
58 `priority` tinyint(3) NOT NULL,
59 `blocked` tinyint(1) NOT NULL DEFAULT '1',
60 `rating` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0-5 reputation, 0 unknown, 1 call police, 5 inscrutable',
61 `reason` text NOT NULL COMMENT 'why a rating was given - will help friends decide to make friends or not',
62 `profile-id` int(11) NOT NULL DEFAULT '0' COMMENT 'which profile to display - 0 is public default',
64 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=109 ;
66 -- --------------------------------------------------------
69 -- Table structure for table `group`
72 CREATE TABLE IF NOT EXISTS `group` (
73 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
74 `uid` int(10) unsigned NOT NULL,
75 `name` char(255) NOT NULL,
77 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
79 -- --------------------------------------------------------
82 -- Table structure for table `group_member`
85 CREATE TABLE IF NOT EXISTS `group_member` (
86 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
87 `uid` int(10) unsigned NOT NULL,
88 `gid` int(10) unsigned NOT NULL,
89 `contact-id` int(10) unsigned NOT NULL,
91 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
93 -- --------------------------------------------------------
96 -- Table structure for table `intro`
99 CREATE TABLE IF NOT EXISTS `intro` (
100 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
101 `uid` int(10) unsigned NOT NULL,
102 `contact-id` int(11) NOT NULL,
103 `knowyou` tinyint(1) NOT NULL,
104 `note` text NOT NULL,
105 `hash` char(255) NOT NULL,
106 `datetime` datetime NOT NULL,
107 `blocked` tinyint(1) NOT NULL DEFAULT '1',
108 `ignore` tinyint(1) NOT NULL DEFAULT '0',
110 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=64 ;
112 -- --------------------------------------------------------
115 -- Table structure for table `item`
118 CREATE TABLE IF NOT EXISTS `item` (
119 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
120 `uid` int(10) unsigned NOT NULL DEFAULT '0',
121 `type` char(255) NOT NULL,
122 `resource-id` char(255) NOT NULL,
123 `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
124 `created` datetime NOT NULL,
125 `edited` datetime NOT NULL,
126 `commented` datetime NOT NULL,
127 `hash` char(255) NOT NULL,
128 `parent` int(10) unsigned NOT NULL DEFAULT '0',
129 `title` char(255) NOT NULL,
130 `body` text NOT NULL,
131 `visible` tinyint(1) NOT NULL DEFAULT '0',
132 `allow_uid` mediumtext NOT NULL,
133 `allow_gid` mediumtext NOT NULL,
134 `deny_uid` mediumtext NOT NULL,
135 `deny_gid` mediumtext NOT NULL,
137 KEY `created` (`created`),
140 KEY `commented` (`commented`),
141 FULLTEXT KEY `body` (`body`),
142 FULLTEXT KEY `title` (`title`)
143 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
145 -- --------------------------------------------------------
148 -- Table structure for table `photo`
151 CREATE TABLE IF NOT EXISTS `photo` (
152 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
153 `uid` int(10) unsigned NOT NULL,
154 `resource-id` char(255) NOT NULL,
155 `created` datetime NOT NULL,
156 `edited` datetime NOT NULL,
157 `title` char(255) NOT NULL,
158 `desc` text NOT NULL,
159 `filename` char(255) NOT NULL,
160 `height` smallint(6) NOT NULL,
161 `width` smallint(6) NOT NULL,
162 `data` mediumblob NOT NULL,
163 `scale` tinyint(3) NOT NULL,
164 `allow_uid` mediumtext NOT NULL,
165 `allow_gid` mediumtext NOT NULL,
166 `deny_uid` mediumtext NOT NULL,
167 `deny_gid` mediumtext NOT NULL,
169 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=95 ;
171 -- --------------------------------------------------------
174 -- Table structure for table `profile`
177 CREATE TABLE IF NOT EXISTS `profile` (
178 `id` int(11) NOT NULL AUTO_INCREMENT,
179 `uid` int(11) NOT NULL,
180 `profile-name` char(255) NOT NULL,
181 `is-default` tinyint(1) NOT NULL DEFAULT '0',
182 `name` char(255) NOT NULL,
183 `dob` char(32) NOT NULL,
184 `address` char(255) NOT NULL,
185 `locality` char(255) NOT NULL,
186 `region` char(255) NOT NULL,
187 `postal-code` char(32) NOT NULL,
188 `country-name` char(255) NOT NULL,
189 `age` tinyint(3) NOT NULL,
190 `gender` char(8) NOT NULL,
191 `marital` char(255) NOT NULL,
192 `about` text NOT NULL,
193 `homepage` char(255) NOT NULL,
194 `photo` char(255) NOT NULL,
195 `thumb` char(255) NOT NULL,
196 `publish` tinyint(1) NOT NULL DEFAULT '0',
198 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
200 -- --------------------------------------------------------
203 -- Table structure for table `profile_check`
206 CREATE TABLE IF NOT EXISTS `profile_check` (
207 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
208 `uid` int(10) unsigned NOT NULL,
209 `dfrn_id` char(255) NOT NULL,
210 `expire` int(11) NOT NULL,
212 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
214 -- --------------------------------------------------------
217 -- Table structure for table `session`
220 CREATE TABLE IF NOT EXISTS `session` (
221 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
222 `sid` char(255) NOT NULL,
223 `data` text NOT NULL,
224 `expire` int(10) unsigned NOT NULL,
227 KEY `expire` (`expire`)
228 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ;
230 -- --------------------------------------------------------
233 -- Table structure for table `user`
236 CREATE TABLE IF NOT EXISTS `user` (
237 `uid` int(11) NOT NULL AUTO_INCREMENT,
238 `username` char(255) NOT NULL,
239 `password` char(255) NOT NULL,
240 `nickname` char(255) NOT NULL,
241 `email` char(255) NOT NULL,
242 `timezone` char(128) NOT NULL,
243 `pubkey` text NOT NULL,
244 `prvkey` text NOT NULL,
245 `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
246 `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
248 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;