2
-- Schema for "Everything"
6
-- Table structure for table `branch`
9
DROP TABLE IF EXISTS `branch`;
10
CREATE TABLE `branch` (
11
`branch_id` int NOT NULL default '0',
12
`project_id` int NOT NULL default '0',
13
PRIMARY KEY (`branch_id`)
17
-- Table structure for table `container`
20
DROP TABLE IF EXISTS `container`;
21
CREATE TABLE `container` (
22
`container_id` int NOT NULL auto_increment,
24
`parent_container` int default NULL,
25
PRIMARY KEY (`container_id`)
29
-- Table structure for table `document`
32
DROP TABLE IF EXISTS `document`;
33
CREATE TABLE `document` (
34
`document_id` int NOT NULL auto_increment,
36
PRIMARY KEY (`document_id`)
40
-- Table structure for table `genstats_attributes`
43
DROP TABLE IF EXISTS `genstats_attributes`;
44
CREATE TABLE `genstats_attributes` (
45
`genstats_attributes_id` int NOT NULL default '0',
46
`predicates` text NOT NULL,
47
`attributes` text NOT NULL,
48
PRIMARY KEY (`genstats_attributes_id`)
52
-- Table structure for table `htmlcode`
55
DROP TABLE IF EXISTS `htmlcode`;
56
CREATE TABLE `htmlcode` (
57
`htmlcode_id` int NOT NULL auto_increment,
59
PRIMARY KEY (`htmlcode_id`)
63
-- Table structure for table `htmlpage`
66
DROP TABLE IF EXISTS `htmlpage`;
67
CREATE TABLE `htmlpage` (
68
`htmlpage_id` int NOT NULL auto_increment,
69
`pagetype_nodetype` int default NULL,
70
`displaytype` varchar(20) default NULL,
72
`parent_container` int default NULL,
73
`ownedby_theme` int NOT NULL default '0',
74
`permissionneeded` char(1) NOT NULL default 'r',
75
`MIMEtype` varchar(255) NOT NULL default 'text/html',
76
PRIMARY KEY (`htmlpage_id`)
80
-- Table structure for table `image`
83
DROP TABLE IF EXISTS `image`;
84
CREATE TABLE `image` (
85
`image_id` int NOT NULL auto_increment,
86
`src` varchar(255) default NULL,
87
`alt` varchar(255) default NULL,
88
`thumbsrc` varchar(255) default NULL,
90
PRIMARY KEY (`image_id`)
94
-- Table structure for table `javascript`
97
DROP TABLE IF EXISTS `javascript`;
98
CREATE TABLE `javascript` (
99
`javascript_id` int NOT NULL default '0',
100
`code` text NOT NULL,
101
`comment` text NOT NULL,
102
`dynamic` int NOT NULL default '0',
103
PRIMARY KEY (`javascript_id`)
107
-- Table structure for table `knowledge_item`
110
DROP TABLE IF EXISTS `knowledge_item`;
111
CREATE TABLE `knowledge_item` (
112
`knowledge_item_id` int NOT NULL default '0',
113
`item` text NOT NULL,
114
`question` int NOT NULL default '0',
115
PRIMARY KEY (`knowledge_item_id`)
119
-- Table structure for table `links`
122
DROP TABLE IF EXISTS `links`;
123
CREATE TABLE `links` (
124
`from_node` int NOT NULL default '0',
125
`to_node` int NOT NULL default '0',
126
`linktype` int NOT NULL default '0',
127
`hits` int default '0',
128
`food` int default '0',
129
PRIMARY KEY (`from_node`,`to_node`,`linktype`)
133
-- Table structure for table `mail`
136
DROP TABLE IF EXISTS `mail`;
137
CREATE TABLE `mail` (
138
`mail_id` int NOT NULL default '0',
139
`from_address` char(80) NOT NULL default '',
140
`attachment_file` int NOT NULL default '0',
141
PRIMARY KEY (`mail_id`)
145
-- Table structure for table `node`
148
DROP TABLE IF EXISTS `node`;
149
CREATE TABLE `node` (
150
`node_id` int NOT NULL auto_increment,
151
`type_nodetype` int NOT NULL default '0',
152
`title` char(240) NOT NULL default '',
153
`author_user` int NOT NULL default '0',
154
`createtime` datetime NOT NULL,
155
`modified` datetime NOT NULL,
156
`hits` int default '0',
157
`loc_location` int default '0',
158
`reputation` int NOT NULL default '0',
159
`lockedby_user` int NOT NULL default '0',
160
`locktime` datetime NOT NULL,
161
`authoraccess` char(4) NOT NULL default 'iiii',
162
`groupaccess` char(5) NOT NULL default 'iiiii',
163
`otheraccess` char(5) NOT NULL default 'iiiii',
164
`guestaccess` char(5) NOT NULL default 'iiiii',
165
`dynamicauthor_permission` int NOT NULL default '-1',
166
`dynamicgroup_permission` int NOT NULL default '-1',
167
`dynamicother_permission` int NOT NULL default '-1',
168
`dynamicguest_permission` int NOT NULL default '-1',
169
`group_usergroup` int NOT NULL default '-1',
170
PRIMARY KEY (`node_id`),
171
KEY `title` (`title`,`type_nodetype`),
172
KEY `author` (`author_user`),
173
KEY `type` (`type_nodetype`)
174
) AUTO_INCREMENT=641;
177
-- Table structure for table `nodegroup`
180
DROP TABLE IF EXISTS `nodegroup`;
181
CREATE TABLE `nodegroup` (
182
`nodegroup_id` int NOT NULL auto_increment,
183
`rank` int NOT NULL default '0',
184
`node_id` int NOT NULL default '0',
185
`orderby` int default NULL,
186
PRIMARY KEY (`nodegroup_id`,`rank`)
187
) AUTO_INCREMENT=624;
190
-- Table structure for table `nodelet`
193
DROP TABLE IF EXISTS `nodelet`;
194
CREATE TABLE `nodelet` (
195
`nodelet_id` int NOT NULL auto_increment,
198
`nlgoto` int default NULL,
199
`parent_container` int default NULL,
200
`lastupdate` int NOT NULL default '0',
201
`updateinterval` int NOT NULL default '0',
202
`mini_nodelet` int NOT NULL default '0',
203
PRIMARY KEY (`nodelet_id`)
204
) AUTO_INCREMENT=495;
207
-- Table structure for table `nodemethod`
210
DROP TABLE IF EXISTS `nodemethod`;
211
CREATE TABLE `nodemethod` (
212
`nodemethod_id` int NOT NULL default '0',
213
`supports_nodetype` int NOT NULL default '0',
214
`code` text NOT NULL,
215
PRIMARY KEY (`nodemethod_id`)
219
-- Table structure for table `nodetype`
222
DROP TABLE IF EXISTS `nodetype`;
223
CREATE TABLE `nodetype` (
224
`nodetype_id` int NOT NULL auto_increment,
225
`restrict_nodetype` int default '0',
226
`extends_nodetype` int default '0',
227
`restrictdupes` int default '0',
228
`sqltable` char(255) default NULL,
229
`grouptable` char(40) default '',
230
`defaultauthoraccess` char(4) NOT NULL default 'iiii',
231
`defaultgroupaccess` char(5) NOT NULL default 'iiiii',
232
`defaultotheraccess` char(5) NOT NULL default 'iiiii',
233
`defaultguestaccess` char(5) NOT NULL default 'iiiii',
234
`defaultgroup_usergroup` int NOT NULL default '-1',
235
`defaultauthor_permission` int NOT NULL default '-1',
236
`defaultgroup_permission` int NOT NULL default '-1',
237
`defaultother_permission` int NOT NULL default '-1',
238
`defaultguest_permission` int NOT NULL default '-1',
239
`maxrevisions` int NOT NULL default '-1',
240
`canworkspace` int NOT NULL default '-1',
241
PRIMARY KEY (`nodetype_id`)
242
) AUTO_INCREMENT=561;
245
-- Table structure for table `project`
248
DROP TABLE IF EXISTS `project`;
249
CREATE TABLE `project` (
250
`project_id` int NOT NULL default '0',
251
`description` text NOT NULL,
252
`last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
253
`short_description` varchar(250) NOT NULL default '',
254
`url_cvs` varchar(250) NOT NULL default '',
255
`url_faq` varchar(250) NOT NULL default '',
256
`long_description` text NOT NULL,
257
PRIMARY KEY (`project_id`)
261
-- Table structure for table `project_document`
264
DROP TABLE IF EXISTS `project_document`;
265
CREATE TABLE `project_document` (
266
`project_document_id` int NOT NULL default '0',
267
`project_id` int NOT NULL default '0',
268
PRIMARY KEY (`project_document_id`)
272
-- Table structure for table `question`
275
DROP TABLE IF EXISTS `question`;
276
CREATE TABLE `question` (
277
`question_id` int NOT NULL default '0',
278
`faq_id` int NOT NULL default '0',
279
`project_id` int NOT NULL default '0',
280
`rank` int NOT NULL default '0',
281
`orderby` int NOT NULL default '0',
282
`description` text NOT NULL,
283
PRIMARY KEY (`question_id`,`rank`)
287
-- Table structure for table `redirects`
290
DROP TABLE IF EXISTS `redirects`;
291
CREATE TABLE `redirects` (
292
`redirects_id` int NOT NULL default '0',
294
PRIMARY KEY (`redirects_id`)
298
-- Table structure for table `releases`
301
DROP TABLE IF EXISTS `releases`;
302
CREATE TABLE `releases` (
303
`releases_id` int NOT NULL default '0',
304
`branch_id` int NOT NULL default '0',
306
`url_targz` varchar(250) NOT NULL default '',
307
`url_osx` varchar(250) NOT NULL default '',
308
`url_rpm` varchar(250) NOT NULL default '',
309
`project_id` int NOT NULL default '0',
310
`version` varchar(30) NOT NULL default 'latest',
311
`created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
312
`url_source_rpm` char(250) NOT NULL,
313
PRIMARY KEY (`releases_id`)
317
-- Table structure for table `revision`
320
DROP TABLE IF EXISTS `revision`;
321
CREATE TABLE `revision` (
322
`node_id` int NOT NULL default '0',
323
`inside_workspace` int NOT NULL default '0',
324
`revision_id` int NOT NULL default '0',
326
`tstamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
327
PRIMARY KEY (`node_id`,`inside_workspace`,`revision_id`)
331
-- Table structure for table `setting`
334
DROP TABLE IF EXISTS `setting`;
335
CREATE TABLE `setting` (
336
`setting_id` int NOT NULL auto_increment,
337
`vars` text NOT NULL,
338
PRIMARY KEY (`setting_id`)
339
) AUTO_INCREMENT=623;
342
-- Table structure for table `symlink`
345
DROP TABLE IF EXISTS `symlink`;
346
CREATE TABLE `symlink` (
347
`symlink_id` int NOT NULL default '0',
348
`symlink_node` int NOT NULL default '0',
349
PRIMARY KEY (`symlink_id`)
353
-- Table structure for table `themesetting`
356
DROP TABLE IF EXISTS `themesetting`;
357
CREATE TABLE `themesetting` (
358
`themesetting_id` int NOT NULL default '0',
359
`parent_theme` int NOT NULL default '0',
360
PRIMARY KEY (`themesetting_id`)
364
-- Table structure for table `typeversion`
367
DROP TABLE IF EXISTS `typeversion`;
368
CREATE TABLE `typeversion` (
369
`typeversion_id` int NOT NULL default '0',
370
`version` int NOT NULL default '0',
371
PRIMARY KEY (`typeversion_id`)
375
-- Table structure for table `user`
378
DROP TABLE IF EXISTS `user`;
379
CREATE TABLE `user` (
380
`user_id` int NOT NULL auto_increment,
381
`nick` varchar(20) default NULL,
382
`passwd` varchar(10) default NULL,
383
`realname` varchar(40) default NULL,
384
`email` varchar(40) default NULL,
385
`lasttime` datetime default NULL,
386
`karma` int default '0',
387
`inside_workspace` int NOT NULL default '0',
388
PRIMARY KEY (`user_id`)
389
) AUTO_INCREMENT=623;
392
-- Table structure for table `version`
395
DROP TABLE IF EXISTS `version`;
396
CREATE TABLE `version` (
397
`version_id` int NOT NULL default '0',
398
`version` int NOT NULL default '1',
399
PRIMARY KEY (`version_id`)
403
-- Table structure for table `weblog`
406
DROP TABLE IF EXISTS `weblog`;
407
CREATE TABLE `weblog` (
408
`tstamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
409
`linkedby_user` int NOT NULL default '0',
410
`removedby_user` int NOT NULL default '0',
411
`linkedtime` datetime NOT NULL,
412
`weblog_id` int NOT NULL default '0',
413
`to_node` int NOT NULL default '0',
414
`entry_id` int NOT NULL auto_increment,
415
PRIMARY KEY (`entry_id`),
416
KEY `tstamp` (`tstamp`)
420
-- Table structure for table `workspace`
423
DROP TABLE IF EXISTS `workspace`;
424
CREATE TABLE `workspace` (
425
`workspace_id` int NOT NULL default '0',
426
PRIMARY KEY (`workspace_id`)