~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to tests/include/everything.sql

  • Committer: Padraig O'Sullivan
  • Date: 2010-03-15 14:05:26 UTC
  • mfrom: (1237.9.99 staging)
  • Revision ID: osullivan.padraig@gmail.com-20100315140526-opbgwdwn6tfecdkq
MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- 
 
2
--  Schema for "Everything"
 
3
--
 
4
 
 
5
--
 
6
-- Table structure for table `branch`
 
7
--
 
8
 
 
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`)
 
14
) ;
 
15
 
 
16
--
 
17
-- Table structure for table `container`
 
18
--
 
19
 
 
20
DROP TABLE IF EXISTS `container`;
 
21
CREATE TABLE `container` (
 
22
  `container_id` int NOT NULL auto_increment,
 
23
  `context` text,
 
24
  `parent_container` int default NULL,
 
25
  PRIMARY KEY  (`container_id`)
 
26
)  AUTO_INCREMENT=312;
 
27
 
 
28
--
 
29
-- Table structure for table `document`
 
30
--
 
31
 
 
32
DROP TABLE IF EXISTS `document`;
 
33
CREATE TABLE `document` (
 
34
  `document_id` int NOT NULL auto_increment,
 
35
  `doctext` text,
 
36
  PRIMARY KEY  (`document_id`)
 
37
)  AUTO_INCREMENT=623;
 
38
 
 
39
--
 
40
-- Table structure for table `genstats_attributes`
 
41
--
 
42
 
 
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`)
 
49
) ENGINE=InnoDB;
 
50
 
 
51
--
 
52
-- Table structure for table `htmlcode`
 
53
--
 
54
 
 
55
DROP TABLE IF EXISTS `htmlcode`;
 
56
CREATE TABLE `htmlcode` (
 
57
  `htmlcode_id` int NOT NULL auto_increment,
 
58
  `code` text,
 
59
  PRIMARY KEY  (`htmlcode_id`)
 
60
)  AUTO_INCREMENT=516;
 
61
 
 
62
--
 
63
-- Table structure for table `htmlpage`
 
64
--
 
65
 
 
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,
 
71
  `page` text,
 
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`)
 
77
)  AUTO_INCREMENT=564;
 
78
 
 
79
--
 
80
-- Table structure for table `image`
 
81
--
 
82
 
 
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,
 
89
  `description` text,
 
90
  PRIMARY KEY  (`image_id`)
 
91
)  AUTO_INCREMENT=138;
 
92
 
 
93
--
 
94
-- Table structure for table `javascript`
 
95
--
 
96
 
 
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`)
 
104
) ;
 
105
 
 
106
--
 
107
-- Table structure for table `knowledge_item`
 
108
--
 
109
 
 
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`)
 
116
) ;
 
117
 
 
118
--
 
119
-- Table structure for table `links`
 
120
--
 
121
 
 
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`)
 
130
) ;
 
131
 
 
132
--
 
133
-- Table structure for table `mail`
 
134
--
 
135
 
 
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`)
 
142
) ;
 
143
 
 
144
--
 
145
-- Table structure for table `node`
 
146
--
 
147
 
 
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;
 
175
 
 
176
--
 
177
-- Table structure for table `nodegroup`
 
178
--
 
179
 
 
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;
 
188
 
 
189
--
 
190
-- Table structure for table `nodelet`
 
191
--
 
192
 
 
193
DROP TABLE IF EXISTS `nodelet`;
 
194
CREATE TABLE `nodelet` (
 
195
  `nodelet_id` int NOT NULL auto_increment,
 
196
  `nltext` text,
 
197
  `nlcode` text,
 
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;
 
205
 
 
206
--
 
207
-- Table structure for table `nodemethod`
 
208
--
 
209
 
 
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`)
 
216
) ;
 
217
 
 
218
--
 
219
-- Table structure for table `nodetype`
 
220
--
 
221
 
 
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;
 
243
 
 
244
--
 
245
-- Table structure for table `project`
 
246
--
 
247
 
 
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`)
 
258
) ;
 
259
 
 
260
--
 
261
-- Table structure for table `project_document`
 
262
--
 
263
 
 
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`)
 
269
) ;
 
270
 
 
271
--
 
272
-- Table structure for table `question`
 
273
--
 
274
 
 
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`)
 
284
) ;
 
285
 
 
286
--
 
287
-- Table structure for table `redirects`
 
288
--
 
289
 
 
290
DROP TABLE IF EXISTS `redirects`;
 
291
CREATE TABLE `redirects` (
 
292
  `redirects_id` int NOT NULL default '0',
 
293
  `url` text NOT NULL,
 
294
  PRIMARY KEY  (`redirects_id`)
 
295
) ;
 
296
 
 
297
--
 
298
-- Table structure for table `releases`
 
299
--
 
300
 
 
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',
 
305
  `description` text,
 
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`)
 
314
) ;
 
315
 
 
316
--
 
317
-- Table structure for table `revision`
 
318
--
 
319
 
 
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',
 
325
  `xml` text NOT NULL,
 
326
  `tstamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
 
327
  PRIMARY KEY  (`node_id`,`inside_workspace`,`revision_id`)
 
328
) ;
 
329
 
 
330
--
 
331
-- Table structure for table `setting`
 
332
--
 
333
 
 
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;
 
340
 
 
341
--
 
342
-- Table structure for table `symlink`
 
343
--
 
344
 
 
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`)
 
350
) ;
 
351
 
 
352
--
 
353
-- Table structure for table `themesetting`
 
354
--
 
355
 
 
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`)
 
361
) ;
 
362
 
 
363
--
 
364
-- Table structure for table `typeversion`
 
365
--
 
366
 
 
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`)
 
372
) ;
 
373
 
 
374
--
 
375
-- Table structure for table `user`
 
376
--
 
377
 
 
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;
 
390
 
 
391
--
 
392
-- Table structure for table `version`
 
393
--
 
394
 
 
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`)
 
400
) ;
 
401
 
 
402
--
 
403
-- Table structure for table `weblog`
 
404
--
 
405
 
 
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`)
 
417
) ;
 
418
 
 
419
--
 
420
-- Table structure for table `workspace`
 
421
--
 
422
 
 
423
DROP TABLE IF EXISTS `workspace`;
 
424
CREATE TABLE `workspace` (
 
425
  `workspace_id` int NOT NULL default '0',
 
426
  PRIMARY KEY  (`workspace_id`)
 
427
) ;