database.4.0.mysql 23.3 KB
Newer Older
1 2
-- $Id$

Kjartan's avatar
Kjartan committed
3 4 5
--
-- Table structure for table 'access'
--
Dries's avatar
 
Dries committed
6
CREATE TABLE access (
7 8 9 10
  aid tinyint(10) NOT NULL auto_increment,
  mask varchar(255) NOT NULL default '',
  type varchar(255) NOT NULL default '',
  status tinyint(2) NOT NULL default '0',
11
  PRIMARY KEY (aid)
12
);
13

Kjartan's avatar
Kjartan committed
14 15 16 17 18
--
-- Table structure for table 'accesslog'
--

CREATE TABLE accesslog (
Dries's avatar
 
Dries committed
19
  aid int(10) NOT NULL auto_increment,
20
  sid varchar(32) NOT NULL default '',
Dries's avatar
 
Dries committed
21 22
  title varchar(255) default NULL,
  path varchar(255) default NULL,
Kjartan's avatar
Kjartan committed
23 24 25
  url varchar(255) default NULL,
  hostname varchar(128) default NULL,
  uid int(10) unsigned default '0',
Dries's avatar
 
Dries committed
26
  timer int(10) unsigned NOT NULL default '0',
Dries's avatar
 
Dries committed
27
  timestamp int(11) unsigned NOT NULL default '0',
28
  KEY accesslog_timestamp (timestamp),
29
  PRIMARY KEY (aid)
30
);
Kjartan's avatar
Kjartan committed
31

Dries's avatar
 
Dries committed
32 33 34 35 36 37 38 39 40
--
-- Table structure for table 'aggregator_category'
--

CREATE TABLE aggregator_category (
  cid int(10) NOT NULL auto_increment,
  title varchar(255) NOT NULL default '',
  description longtext NOT NULL,
  block tinyint(2) NOT NULL default '0',
41
  PRIMARY KEY (cid),
Dries's avatar
 
Dries committed
42
  UNIQUE KEY title (title)
43
);
Dries's avatar
 
Dries committed
44 45 46 47 48 49 50 51

--
-- Table structure for table 'aggregator_category_feed'
--

CREATE TABLE aggregator_category_feed (
  fid int(10) NOT NULL default '0',
  cid int(10) NOT NULL default '0',
52
  PRIMARY KEY (fid,cid)
53
);
Dries's avatar
 
Dries committed
54 55 56 57 58 59 60 61

--
-- Table structure for table 'aggregator_category_item'
--

CREATE TABLE aggregator_category_item (
  iid int(10) NOT NULL default '0',
  cid int(10) NOT NULL default '0',
62
  PRIMARY KEY (iid,cid)
63
);
Dries's avatar
 
Dries committed
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

--
-- Table structure for table 'aggregator_feed'
--

CREATE TABLE aggregator_feed (
  fid int(10) NOT NULL auto_increment,
  title varchar(255) NOT NULL default '',
  url varchar(255) NOT NULL default '',
  refresh int(10) NOT NULL default '0',
  checked int(10) NOT NULL default '0',
  link varchar(255) NOT NULL default '',
  description longtext NOT NULL,
  image longtext NOT NULL,
  etag varchar(255) NOT NULL default '',
  modified int(10) NOT NULL default '0',
  block tinyint(2) NOT NULL default '0',
81
  PRIMARY KEY (fid),
Dries's avatar
 
Dries committed
82 83
  UNIQUE KEY link (url),
  UNIQUE KEY title (title)
84
);
Dries's avatar
 
Dries committed
85 86 87 88 89 90 91 92 93 94 95 96 97

--
-- Table structure for table 'aggregator_item'
--

CREATE TABLE aggregator_item (
  iid int(10) NOT NULL auto_increment,
  fid int(10) NOT NULL default '0',
  title varchar(255) NOT NULL default '',
  link varchar(255) NOT NULL default '',
  author varchar(255) NOT NULL default '',
  description longtext NOT NULL,
  timestamp int(11) default NULL,
98
  PRIMARY KEY (iid)
99
);
Dries's avatar
 
Dries committed
100

Kjartan's avatar
Kjartan committed
101 102 103
--
-- Table structure for table 'authmap'
--
104 105 106 107 108 109

CREATE TABLE authmap (
  aid int(10) unsigned NOT NULL auto_increment,
  uid int(10) NOT NULL default '0',
  authname varchar(128) NOT NULL default '',
  module varchar(128) NOT NULL default '',
110
  PRIMARY KEY (aid),
111
  UNIQUE KEY authname (authname)
112
);
Dries's avatar
 
Dries committed
113

Kjartan's avatar
Kjartan committed
114 115 116
--
-- Table structure for table 'blocks'
--
117

Dries's avatar
 
Dries committed
118
CREATE TABLE blocks (
Dries's avatar
 
Dries committed
119
  module varchar(64) DEFAULT '' NOT NULL,
Dries's avatar
 
Dries committed
120
  delta varchar(32) NOT NULL default '0',
121
  theme varchar(255) NOT NULL default '',
Dries's avatar
 
Dries committed
122 123
  status tinyint(2) DEFAULT '0' NOT NULL,
  weight tinyint(1) DEFAULT '0' NOT NULL,
124
  region varchar(64) DEFAULT 'left' NOT NULL,
Dries's avatar
 
Dries committed
125
  custom tinyint(2) DEFAULT '0' NOT NULL,
126 127
  throttle tinyint(1) DEFAULT '0' NOT NULL,
  visibility tinyint(1) DEFAULT '0' NOT NULL,
128
  pages text DEFAULT '' NOT NULL
129
);
Dries's avatar
 
Dries committed
130

Kjartan's avatar
Kjartan committed
131 132 133
--
-- Table structure for table 'book'
--
134

Dries's avatar
 
Dries committed
135
CREATE TABLE book (
136
  vid int(10) unsigned NOT NULL default '0',
137 138 139
  nid int(10) unsigned NOT NULL default '0',
  parent int(10) NOT NULL default '0',
  weight tinyint(3) NOT NULL default '0',
140 141
  PRIMARY KEY (vid),
  KEY nid (nid),
Dries's avatar
 
Dries committed
142
  KEY parent (parent)
143
);
Dries's avatar
 
Dries committed
144

Kjartan's avatar
Kjartan committed
145 146 147
--
-- Table structure for table 'boxes'
--
148

Dries's avatar
 
Dries committed
149
CREATE TABLE boxes (
150 151
  bid tinyint(4) NOT NULL auto_increment,
  title varchar(64) NOT NULL default '',
Dries's avatar
 
Dries committed
152
  body longtext,
153
  info varchar(128) NOT NULL default '',
154
  format int(4) NOT NULL default '0',
155
  PRIMARY KEY (bid),
Kjartan's avatar
Kjartan committed
156
  UNIQUE KEY info (info)
157
);
Dries's avatar
 
Dries committed
158

Kjartan's avatar
Kjartan committed
159 160 161
--
-- Table structure for table 'cache'
--
162

Dries's avatar
 
Dries committed
163
CREATE TABLE cache (
164
  cid varchar(255) NOT NULL default '',
165
  data longblob,
166
  expire int(11) NOT NULL default '0',
Dries's avatar
 
Dries committed
167
  created int(11) NOT NULL default '0',
Dries's avatar
Dries committed
168
  headers text,
169
  PRIMARY KEY (cid),
170
  INDEX expire (expire)
171
);
Dries's avatar
 
Dries committed
172

Kjartan's avatar
Kjartan committed
173 174 175
--
-- Table structure for table 'comments'
--
176

Dries's avatar
 
Dries committed
177
CREATE TABLE comments (
178 179 180 181 182
  cid int(10) NOT NULL auto_increment,
  pid int(10) NOT NULL default '0',
  nid int(10) NOT NULL default '0',
  uid int(10) NOT NULL default '0',
  subject varchar(64) NOT NULL default '',
Dries's avatar
 
Dries committed
183
  comment longtext NOT NULL,
184 185
  hostname varchar(128) NOT NULL default '',
  timestamp int(11) NOT NULL default '0',
Kjartan's avatar
Kjartan committed
186 187
  score mediumint(9) NOT NULL default '0',
  status tinyint(3) unsigned NOT NULL default '0',
188
  format int(4) NOT NULL default '0',
189
  thread varchar(255) NOT NULL,
Dries's avatar
 
Dries committed
190
  users longtext,
Dries's avatar
 
Dries committed
191 192 193
  name varchar(60) default NULL,
  mail varchar(64) default NULL,
  homepage varchar(255) default NULL,
194
  PRIMARY KEY (cid),
195
  KEY lid (nid)
196
);
Dries's avatar
 
Dries committed
197

198
--
199 200 201 202
-- Table structre for table 'contact'
--

CREATE TABLE contact (
203
  cid int(10) unsigned NOT NULL auto_increment,
Dries's avatar
Dries committed
204
  category varchar(255) NOT NULL default '',
205
  recipients longtext NOT NULL default '',
Dries's avatar
Dries committed
206
  reply longtext NOT NULL default '',
207 208
  weight tinyint(3) NOT NULL default '0',
  selected tinyint(1) NOT NULL default '0',
209 210
  PRIMARY KEY (cid),
  UNIQUE KEY category (category)
211
);
212 213 214

--
-- Table structre for table 'node_comment_statistics'
215 216 217 218 219
--

CREATE TABLE node_comment_statistics (
  nid int(10) unsigned NOT NULL auto_increment,
  last_comment_timestamp int(11) NOT NULL default '0',
220
  last_comment_name varchar(60) default NULL,
221 222 223 224
  last_comment_uid int(10) NOT NULL default '0',
  comment_count int(10) unsigned NOT NULL default '0',
  PRIMARY KEY (nid),
  KEY node_comment_timestamp (last_comment_timestamp)
225
);
226

Kjartan's avatar
Kjartan committed
227
--
228
-- Table structure for table 'client'
Kjartan's avatar
Kjartan committed
229
--
Dries's avatar
 
Dries committed
230

231 232
CREATE TABLE client (
  cid int(10) unsigned NOT NULL auto_increment,
233 234 235
  link varchar(255) NOT NULL default '',
  name varchar(128) NOT NULL default '',
  mail varchar(128) NOT NULL default '',
Dries's avatar
 
Dries committed
236 237
  slogan longtext NOT NULL,
  mission longtext NOT NULL,
238 239 240 241 242 243
  users int(10) NOT NULL default '0',
  nodes int(10) NOT NULL default '0',
  version varchar(35) NOT NULL default'',
  created int(11) NOT NULL default '0',
  changed int(11) NOT NULL default '0',
  PRIMARY KEY (cid)
244
);
245 246 247 248 249 250 251 252 253 254

--
-- Table structure for table 'client_system'
--

CREATE TABLE client_system (
  cid int(10) NOT NULL default '0',
  name varchar(255) NOT NULL default '',
  type varchar(255) NOT NULL default '',
  PRIMARY KEY (cid,name)
255
);
Dries's avatar
 
Dries committed
256

Dries's avatar
 
Dries committed
257 258 259 260 261
--
-- Table structure for table 'files'
--

CREATE TABLE files (
262 263
  fid int(10) unsigned NOT NULL default 0,
  nid int(10) unsigned NOT NULL default 0,
Dries's avatar
 
Dries committed
264 265 266
  filename varchar(255) NOT NULL default '',
  filepath varchar(255) NOT NULL default '',
  filemime varchar(255) NOT NULL default '',
267 268
  filesize int(10) unsigned NOT NULL default 0,
  PRIMARY KEY (fid)
269
);
270 271 272 273 274 275 276 277 278 279 280

--
-- Table structure for table 'file_revisions'
--

CREATE TABLE file_revisions (
  fid int(10) unsigned NOT NULL default 0,
  vid int(10) unsigned NOT NULL default 0,
  description varchar(255) NOT NULL default '',
  list tinyint(1) unsigned NOT NULL default 0,
  PRIMARY KEY (fid, vid)
281
);
Dries's avatar
 
Dries committed
282

283 284 285 286 287
--
-- Table structure for table 'filter_formats'
--

CREATE TABLE filter_formats (
288
  format int(4) NOT NULL auto_increment,
289 290 291
  name varchar(255) NOT NULL default '',
  roles varchar(255) NOT NULL default '',
  cache tinyint(2) NOT NULL default '0',
292 293
  PRIMARY KEY (format),
  UNIQUE KEY (name)
294
);
295

Dries's avatar
 
Dries committed
296 297 298 299 300
--
-- Table structure for table 'filters'
--

CREATE TABLE filters (
301
  format int(4) NOT NULL default '0',
Dries's avatar
 
Dries committed
302
  module varchar(64) NOT NULL default '',
303
  delta tinyint(2) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
304
  weight tinyint(2) DEFAULT '0' NOT NULL,
305
  INDEX (weight)
306
);
Dries's avatar
 
Dries committed
307

Dries's avatar
 
Dries committed
308 309 310 311 312 313 314 315
--
-- Table structure for table 'flood'
--

CREATE TABLE flood (
  event varchar(64) NOT NULL default '',
  hostname varchar(128) NOT NULL default '',
  timestamp int(11) NOT NULL default '0'
316
);
Dries's avatar
 
Dries committed
317

Kjartan's avatar
Kjartan committed
318 319 320 321
--
-- Table structure for table 'forum'
--

Dries's avatar
 
Dries committed
322
CREATE TABLE forum (
Kjartan's avatar
Kjartan committed
323
  nid int(10) unsigned NOT NULL default '0',
324
  vid int(10) unsigned NOT NULL default '0',
325
  tid int(10) unsigned NOT NULL default '0',
326 327
  PRIMARY KEY (vid),
  KEY nid (nid),
Kjartan's avatar
Kjartan committed
328
  KEY tid (tid)
329
);
Dries's avatar
 
Dries committed
330

Kjartan's avatar
Kjartan committed
331 332 333
--
-- Table structure for table 'history'
--
334 335 336 337 338

CREATE TABLE history (
  uid int(10) NOT NULL default '0',
  nid int(10) NOT NULL default '0',
  timestamp int(11) NOT NULL default '0',
339
  PRIMARY KEY (uid,nid)
340
);
Dries's avatar
 
Dries committed
341

Kjartan's avatar
Kjartan committed
342
--
Dries's avatar
 
Dries committed
343
-- Table structure for table 'locales_meta'
Kjartan's avatar
Kjartan committed
344
--
345

Dries's avatar
 
Dries committed
346 347 348 349 350 351 352
CREATE TABLE locales_meta (
  locale varchar(12) NOT NULL default '',
  name varchar(64) NOT NULL default '',
  enabled int(2) NOT NULL default '0',
  isdefault int(2) NOT NULL default '0',
  plurals int(1) NOT NULL default '0',
  formula varchar(128) NOT NULL default '',
353
  PRIMARY KEY (locale)
354
);
Dries's avatar
 
Dries committed
355 356 357 358 359 360 361

--
-- Table structure for table 'locales_source'
--

CREATE TABLE locales_source (
  lid int(11) NOT NULL auto_increment,
362
  location varchar(255) NOT NULL default '',
Dries's avatar
 
Dries committed
363
  source blob NOT NULL,
364
  PRIMARY KEY (lid)
365
);
366

Dries's avatar
 
Dries committed
367 368 369 370 371 372
--
-- Table structure for table 'locales_target'
--

CREATE TABLE locales_target (
  lid int(11) NOT NULL default '0',
373
  translation blob NOT NULL,
Dries's avatar
 
Dries committed
374 375 376 377 378 379 380
  locale varchar(12) NOT NULL default '',
  plid int(11) NOT NULL default '0',
  plural int(1) NOT NULL default '0',
  KEY lid (lid),
  KEY lang (locale),
  KEY plid (plid),
  KEY plural (plural)
381
);
Dries's avatar
 
Dries committed
382

383 384 385 386 387 388 389 390 391
--
-- Table structure for table 'menu'
--

CREATE TABLE menu (
  mid int(10) unsigned NOT NULL default '0',
  pid int(10) unsigned NOT NULL default '0',
  path varchar(255) NOT NULL default '',
  title varchar(255) NOT NULL default '',
Dries's avatar
 
Dries committed
392
  description varchar(255) NOT NULL default '',
393
  weight tinyint(4) NOT NULL default '0',
Dries's avatar
 
Dries committed
394
  type int(2) unsigned NOT NULL default '0',
395
  PRIMARY KEY (mid)
396
);
397

Kjartan's avatar
Kjartan committed
398 399 400
--
-- Table structure for table 'node'
--
401

Dries's avatar
 
Dries committed
402
CREATE TABLE node (
403
  nid int(10) unsigned NOT NULL auto_increment,
404
  vid int(10) unsigned NOT NULL default '0',
405
  type varchar(32) NOT NULL default '',
406 407 408 409
  title varchar(128) NOT NULL default '',
  uid int(10) NOT NULL default '0',
  status int(4) NOT NULL default '1',
  created int(11) NOT NULL default '0',
Dries's avatar
 
Dries committed
410
  changed int(11) NOT NULL default '0',
411 412 413
  comment int(2) NOT NULL default '0',
  promote int(2) NOT NULL default '0',
  moderate int(2) NOT NULL default '0',
Dries's avatar
 
Dries committed
414
  sticky int(2) NOT NULL default '0',
415 416
  PRIMARY KEY  (nid, vid),
  UNIQUE KEY vid (vid),
Dries's avatar
 
Dries committed
417
  KEY node_type (type(4)),
418
  KEY node_title_type (title, type(4)),
419
  KEY status (status),
Dries's avatar
 
Dries committed
420 421
  KEY uid (uid),
  KEY node_moderate (moderate),
422 423
  KEY node_promote_status (promote, status),
  KEY node_created (created),
424
  KEY node_changed (changed),
425 426
  KEY node_status_type (status, type, nid),
  KEY nid (nid)
427
);
Dries's avatar
 
Dries committed
428

429 430 431
--
-- Table structure for table `node_access`
--
Dries's avatar
 
Dries committed
432 433 434 435 436 437 438 439

CREATE TABLE node_access (
  nid int(10) unsigned NOT NULL default '0',
  gid int(10) unsigned NOT NULL default '0',
  realm varchar(255) NOT NULL default '',
  grant_view tinyint(1) unsigned NOT NULL default '0',
  grant_update tinyint(1) unsigned NOT NULL default '0',
  grant_delete tinyint(1) unsigned NOT NULL default '0',
440
  PRIMARY KEY (nid,gid,realm)
441
);
Dries's avatar
 
Dries committed
442

443 444 445 446 447 448 449 450 451 452 453 454 455 456
--
-- Table structure for table 'node_revisions'
--

CREATE TABLE node_revisions (
  nid int(10) unsigned NOT NULL,
  vid int(10) unsigned NOT NULL,
  uid int(10) NOT NULL default '0',
  title varchar(128) NOT NULL default '',
  body longtext NOT NULL default '',
  teaser longtext NOT NULL default '',
  log longtext NOT NULL default '',
  timestamp int(11) NOT NULL default '0',
  format int(4) NOT NULL default '0',
457 458
  PRIMARY KEY  (vid),
  KEY nid (nid),
459
  KEY uid (uid)
460
);
461

Dries's avatar
 
Dries committed
462 463 464 465 466 467 468 469 470 471
--
-- Table structure for table 'profile_fields'
--

CREATE TABLE profile_fields (
  fid int(10) NOT NULL auto_increment,
  title varchar(255) default NULL,
  name varchar(128) default NULL,
  explanation TEXT default NULL,
  category varchar(255) default NULL,
Dries's avatar
 
Dries committed
472
  page varchar(255) default NULL,
Dries's avatar
 
Dries committed
473 474
  type varchar(128) default NULL,
  weight tinyint(1) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
475
  required tinyint(1) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
476
  register tinyint(1) DEFAULT '0' NOT NULL,
477
  visibility tinyint(1) DEFAULT '0' NOT NULL,
478
  autocomplete tinyint(1) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
479 480 481 482
  options text,
  KEY category (category),
  UNIQUE KEY name (name),
  PRIMARY KEY (fid)
483
);
Dries's avatar
 
Dries committed
484 485 486 487 488 489

--
-- Table structure for table 'profile_values'
--

CREATE TABLE profile_values (
490 491
  fid int(10) unsigned default '0',
  uid int(10) unsigned default '0',
Dries's avatar
 
Dries committed
492 493 494
  value text,
  KEY uid (uid),
  KEY fid (fid)
495
);
Dries's avatar
 
Dries committed
496 497


Dries's avatar
 
Dries committed
498
--
Dries's avatar
 
Dries committed
499
-- Table structure for table 'url_alias'
Dries's avatar
 
Dries committed
500 501
--

Dries's avatar
 
Dries committed
502
CREATE TABLE url_alias (
Dries's avatar
 
Dries committed
503
  pid int(10) unsigned NOT NULL auto_increment,
Dries's avatar
 
Dries committed
504 505
  src varchar(128) NOT NULL default '',
  dst varchar(128) NOT NULL default '',
506
  PRIMARY KEY (pid),
507 508
  UNIQUE KEY dst (dst),
  KEY src (src)
509
);
Dries's avatar
 
Dries committed
510

Kjartan's avatar
Kjartan committed
511 512 513
--
-- Table structure for table 'permission'
--
514 515 516

CREATE TABLE permission (
  rid int(10) unsigned NOT NULL default '0',
Dries's avatar
 
Dries committed
517
  perm longtext,
518 519
  tid int(10) unsigned NOT NULL default '0',
  KEY rid (rid)
520
);
521

Kjartan's avatar
Kjartan committed
522 523 524
--
-- Table structure for table 'poll'
--
525

526
CREATE TABLE poll (
527 528 529
  nid int(10) unsigned NOT NULL default '0',
  runtime int(10) NOT NULL default '0',
  active int(2) unsigned NOT NULL default '0',
530
  PRIMARY KEY (nid)
531
);
532

533 534 535 536 537 538
--
-- Table structure for table 'poll_votes'
--

CREATE TABLE poll_votes (
  nid int(10) unsigned NOT NULL,
Dries's avatar
Dries committed
539
  uid int(10) unsigned NOT NULL default 0,
540
  chorder int(10) NOT NULL default -1,
Dries's avatar
Dries committed
541
  hostname varchar(128) NOT NULL default '',
542 543 544
  INDEX (nid),
  INDEX (uid),
  INDEX (hostname)
545
);
546

Kjartan's avatar
Kjartan committed
547 548 549
--
-- Table structure for table 'poll_choices'
--
550

551
CREATE TABLE poll_choices (
552 553 554 555 556
  chid int(10) unsigned NOT NULL auto_increment,
  nid int(10) unsigned NOT NULL default '0',
  chtext varchar(128) NOT NULL default '',
  chvotes int(6) NOT NULL default '0',
  chorder int(2) NOT NULL default '0',
557
  PRIMARY KEY (chid),
Kjartan's avatar
Kjartan committed
558
  KEY nid (nid)
559
);
560

Kjartan's avatar
Kjartan committed
561 562 563
--
-- Table structure for table 'role'
--
564

Dries's avatar
 
Dries committed
565
CREATE TABLE role (
566 567
  rid int(10) unsigned NOT NULL auto_increment,
  name varchar(32) NOT NULL default '',
568
  PRIMARY KEY (rid),
569
  UNIQUE KEY name (name)
570
);
Dries's avatar
 
Dries committed
571

572 573 574 575 576 577 578 579 580 581 582
--
-- Table structure for table 'blocks_roles'
--
CREATE TABLE blocks_roles (
  module varchar(64) NOT NULL,
  delta varchar(32) NOT NULL,
  rid int(10) unsigned NOT NULL,
  PRIMARY KEY (module, delta, rid)
)
/*!40100 DEFAULT CHARACTER SET utf8 */ ;

583 584 585 586 587 588 589 590
--
-- Table structure for table 'search_dataset'
--
CREATE TABLE search_dataset (
  sid int(10) unsigned NOT NULL default '0',
  type varchar(16) default NULL,
  data longtext NOT NULL,
  KEY sid_type (sid, type)
591
);
592

Kjartan's avatar
Kjartan committed
593 594 595
--
-- Table structure for table 'search_index'
--
596 597

CREATE TABLE search_index (
Kjartan's avatar
Kjartan committed
598
  word varchar(50) NOT NULL default '',
599
  sid int(10) unsigned NOT NULL default '0',
Kjartan's avatar
Kjartan committed
600
  type varchar(16) default NULL,
601 602
  fromsid int(10) unsigned NOT NULL default '0',
  fromtype varchar(16) default NULL,
603 604 605
  score float default NULL,
  KEY sid_type (sid, type),
  KEY from_sid_type (fromsid, fromtype),
606
  KEY word (word)
607
);
608 609 610 611 612 613 614

--
-- Table structure for table 'search_total'
--

CREATE TABLE search_total (
  word varchar(50) NOT NULL default '',
615
  count float default NULL,
616
  PRIMARY KEY (word)
617
);
Kjartan's avatar
Kjartan committed
618

Dries's avatar
 
Dries committed
619
--
620
-- Table structure for table 'sessions'
Dries's avatar
 
Dries committed
621 622 623 624 625 626 627 628
--


CREATE TABLE sessions (
  uid int(10) unsigned NOT NULL,
  sid varchar(32) NOT NULL default '',
  hostname varchar(128) NOT NULL default '',
  timestamp int(11) NOT NULL default '0',
629
  cache int(11) NOT NULL default '0',
Dries's avatar
 
Dries committed
630
  session longtext,
Dries's avatar
 
Dries committed
631
  KEY uid (uid),
632
  PRIMARY KEY (sid),
Dries's avatar
 
Dries committed
633
  KEY timestamp (timestamp)
634
);
Dries's avatar
 
Dries committed
635

Kjartan's avatar
Kjartan committed
636 637 638 639 640 641 642
--
-- Table structure for table 'sequences'
--

CREATE TABLE sequences (
  name varchar(255) NOT NULL default '',
  id int(10) unsigned NOT NULL default '0',
643
  PRIMARY KEY (name)
644
);
645

Kjartan's avatar
Kjartan committed
646
--
Dries's avatar
 
Dries committed
647
-- Table structure for table 'node_counter'
Kjartan's avatar
Kjartan committed
648 649
--

Dries's avatar
 
Dries committed
650
CREATE TABLE node_counter (
651
  nid int(10) NOT NULL default '0',
Kjartan's avatar
Kjartan committed
652 653 654
  totalcount bigint(20) unsigned NOT NULL default '0',
  daycount mediumint(8) unsigned NOT NULL default '0',
  timestamp int(11) unsigned NOT NULL default '0',
655
  PRIMARY KEY (nid),
Kjartan's avatar
Kjartan committed
656 657 658
  KEY totalcount (totalcount),
  KEY daycount (daycount),
  KEY timestamp (timestamp)
659
);
Kjartan's avatar
Kjartan committed
660 661 662 663

--
-- Table structure for table 'system'
--
664 665 666 667 668 669 670

CREATE TABLE system (
  filename varchar(255) NOT NULL default '',
  name varchar(255) NOT NULL default '',
  type varchar(255) NOT NULL default '',
  description varchar(255) NOT NULL default '',
  status int(2) NOT NULL default '0',
Dries's avatar
 
Dries committed
671
  throttle tinyint(1) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
672
  bootstrap int(2) NOT NULL default '0',
673
  schema_version smallint(3) NOT NULL default -1,
674 675 676
  weight int(2) NOT NULL default '0',
  PRIMARY KEY (filename),
  KEY (weight)
677
);
Dries's avatar
 
Dries committed
678

Kjartan's avatar
Kjartan committed
679 680 681
--
-- Table structure for table 'term_data'
--
682 683 684 685 686

CREATE TABLE term_data (
  tid int(10) unsigned NOT NULL auto_increment,
  vid int(10) unsigned NOT NULL default '0',
  name varchar(255) NOT NULL default '',
Dries's avatar
 
Dries committed
687
  description longtext,
688
  weight tinyint(4) NOT NULL default '0',
689
  PRIMARY KEY (tid),
690
  KEY vid (vid)
691
);
692

Kjartan's avatar
Kjartan committed
693 694 695
--
-- Table structure for table 'term_hierarchy'
--
696 697 698 699 700

CREATE TABLE term_hierarchy (
  tid int(10) unsigned NOT NULL default '0',
  parent int(10) unsigned NOT NULL default '0',
  KEY tid (tid),
701 702
  KEY parent (parent),
  PRIMARY KEY (tid, parent)
703
);
704

Kjartan's avatar
Kjartan committed
705 706 707
--
-- Table structure for table 'term_node'
--
708 709 710 711 712

CREATE TABLE term_node (
  nid int(10) unsigned NOT NULL default '0',
  tid int(10) unsigned NOT NULL default '0',
  KEY nid (nid),
713 714
  KEY tid (tid),
  PRIMARY KEY (tid,nid)
715
);
716

Kjartan's avatar
Kjartan committed
717 718 719
--
-- Table structure for table 'term_relation'
--
720 721 722 723 724 725

CREATE TABLE term_relation (
  tid1 int(10) unsigned NOT NULL default '0',
  tid2 int(10) unsigned NOT NULL default '0',
  KEY tid1 (tid1),
  KEY tid2 (tid2)
726
);
727

Kjartan's avatar
Kjartan committed
728 729 730
--
-- Table structure for table 'term_synonym'
--
731 732 733 734 735 736

CREATE TABLE term_synonym (
  tid int(10) unsigned NOT NULL default '0',
  name varchar(255) NOT NULL default '',
  KEY tid (tid),
  KEY name (name(3))
737
);
738

Kjartan's avatar
Kjartan committed
739 740 741
--
-- Table structure for table 'users'
--
742

Dries's avatar
 
Dries committed
743
CREATE TABLE users (
Dries's avatar
 
Dries committed
744
  uid int(10) unsigned NOT NULL default '0',
745 746 747 748 749 750 751 752
  name varchar(60) NOT NULL default '',
  pass varchar(32) NOT NULL default '',
  mail varchar(64) default '',
  mode tinyint(1) NOT NULL default '0',
  sort tinyint(1) default '0',
  threshold tinyint(1) default '0',
  theme varchar(255) NOT NULL default '',
  signature varchar(255) NOT NULL default '',
Dries's avatar
 
Dries committed
753
  created int(11) NOT NULL default '0',
754
  access int(11) NOT NULL default '0',
755
  login int(11) NOT NULL default '0',
756 757
  status tinyint(4) NOT NULL default '0',
  timezone varchar(8) default NULL,
Dries's avatar
 
Dries committed
758
  language varchar(12) NOT NULL default '',
Dries's avatar
 
Dries committed
759
  picture varchar(255) NOT NULL DEFAULT '',
760
  init varchar(64) default '',
Dries's avatar
 
Dries committed
761
  data longtext,
762
  PRIMARY KEY (uid),
Kjartan's avatar
Kjartan committed
763
  UNIQUE KEY name (name),
764
  KEY access (access)
765
);
Dries's avatar
 
Dries committed
766

Dries's avatar
 
Dries committed
767 768 769 770 771 772 773 774
--
-- Table structure for table 'users_roles'
--

CREATE TABLE users_roles (
  uid int(10) unsigned NOT NULL default '0',
  rid int(10) unsigned NOT NULL default '0',
  PRIMARY KEY (uid, rid)
775
);
Dries's avatar
 
Dries committed
776

Kjartan's avatar
Kjartan committed
777 778 779
--
-- Table structure for table 'variable'
--
780

Dries's avatar
 
Dries committed
781
CREATE TABLE variable (
Dries's avatar
 
Dries committed
782
  name varchar(48) NOT NULL default '',
Dries's avatar
 
Dries committed
783
  value longtext NOT NULL,
784
  PRIMARY KEY (name)
785
);
Dries's avatar
 
Dries committed
786

Kjartan's avatar
Kjartan committed
787 788 789
--
-- Table structure for table 'vocabulary'
--
790 791 792 793

CREATE TABLE vocabulary (
  vid int(10) unsigned NOT NULL auto_increment,
  name varchar(255) NOT NULL default '',
Dries's avatar
 
Dries committed
794
  description longtext,
795
  help varchar(255) NOT NULL default '',
796 797 798 799
  relations tinyint(3) unsigned NOT NULL default '0',
  hierarchy tinyint(3) unsigned NOT NULL default '0',
  multiple tinyint(3) unsigned NOT NULL default '0',
  required tinyint(3) unsigned NOT NULL default '0',
Dries's avatar
Dries committed
800
  tags tinyint(3) unsigned NOT NULL default '0',
801
  module varchar(255) NOT NULL default '',
802
  weight tinyint(4) NOT NULL default '0',
803
  PRIMARY KEY (vid)
804
);
805

Dries's avatar
 
Dries committed
806 807 808 809 810 811
--
-- Table structure for table 'vocabulary_node_types'
--

CREATE TABLE vocabulary_node_types (
  vid int(10) unsigned NOT NULL DEFAULT '0',
812
  type varchar(32) NOT NULL DEFAULT '',
Dries's avatar
 
Dries committed
813
  PRIMARY KEY (vid, type)
814
);
Dries's avatar
 
Dries committed
815

Kjartan's avatar
Kjartan committed
816 817 818
--
-- Table structure for table 'watchdog'
--
819

Dries's avatar
 
Dries committed
820
CREATE TABLE watchdog (
821 822 823
  wid int(5) NOT NULL auto_increment,
  uid int(10) NOT NULL default '0',
  type varchar(16) NOT NULL default '',
Dries's avatar
 
Dries committed
824
  message longtext NOT NULL,
825
  severity tinyint(3) unsigned NOT NULL default '0',
826
  link varchar(255) NOT NULL default '',
827
  location varchar(128) NOT NULL default '',
828
  referer varchar(128) NOT NULL default '',
829 830
  hostname varchar(128) NOT NULL default '',
  timestamp int(11) NOT NULL default '0',
831
  PRIMARY KEY (wid)
832
);
833

Kjartan's avatar
Kjartan committed
834 835 836
--
-- Insert some default values
--
Dries's avatar
 
Dries committed
837

838 839 840 841 842 843 844 845 846 847 848 849 850 851
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/block.module', 'block', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/comment.module', 'comment', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/filter.module', 'filter', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/help.module', 'help', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/menu.module', 'menu', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/node.module', 'node', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/page.module', 'page', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/story.module', 'story', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/system.module', 'system', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/taxonomy.module', 'taxonomy', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/user.module', 'user', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/watchdog.module', 'watchdog', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('themes/engines/phptemplate/phptemplate.engine', 'phptemplate', 'theme_engine', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('themes/bluemarine/page.tpl.php', 'bluemarine', 'theme', 'themes/engines/phptemplate/phptemplate.engine', 1, 0, 0, 0);
852
INSERT INTO users (uid, name, mail) VALUES ('0', '', '');
Dries's avatar
 
Dries committed
853 854 855

INSERT INTO role (rid, name) VALUES (1, 'anonymous user');
INSERT INTO role (rid, name) VALUES (2, 'authenticated user');
856 857

INSERT INTO permission VALUES (1,'access content',0);
Dries's avatar
 
Dries committed
858
INSERT INTO permission VALUES (2,'access comments, access content, post comments, post comments without approval',0);
Kjartan's avatar
Kjartan committed
859

860
INSERT INTO variable (name, value) VALUES ('theme_default', 's:10:"bluemarine";');
Kjartan's avatar
Kjartan committed
861

862 863
INSERT INTO blocks (module, delta, theme, status, pages) VALUES ('user', '0', 'bluemarine', '1', '');
INSERT INTO blocks (module, delta, theme, status, pages) VALUES ('user', '1', 'bluemarine', '1', '');
864

865
INSERT INTO sequences (name, id) VALUES ('menu_mid', 2);
Dries's avatar
 
Dries committed
866 867

INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
868 869 870 871 872

INSERT INTO filter_formats VALUES (1,'Filtered HTML',',1,2,',1);
INSERT INTO filter_formats VALUES (2,'PHP code','',0);
INSERT INTO filter_formats VALUES (3,'Full HTML','',1);
INSERT INTO filters VALUES (1,'filter',0,0);
873
INSERT INTO filters VALUES (1,'filter',2,1);
874
INSERT INTO filters VALUES (2,'filter',1,0);
875
INSERT INTO filters VALUES (3,'filter',2,0);
876
INSERT INTO variable (name,value) VALUES ('filter_html_1','i:1;');
Dries's avatar
 
Dries committed
877 878

INSERT INTO locales_meta (locale, name, enabled, isdefault) VALUES ('en', 'English', '1', '1');
879

880
INSERT INTO variable (name, value) VALUES ('node_options_forum', 'a:1:{i:0;s:6:"status";}');
881 882 883 884

INSERT INTO menu VALUES (2, 0, '', 'Primary links', '', 0, 115);
INSERT INTO variable VALUES ('menu_primary_menu', 'i:2;');
INSERT INTO variable VALUES ('menu_secondary_menu', 'i:2;');
885