database.4.1.mysql 24.9 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
DEFAULT CHARACTER SET utf8;
14

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

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

Dries's avatar
 
Dries committed
34 35 36 37 38 39 40 41 42
--
-- 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',
43
  PRIMARY KEY (cid),
Dries's avatar
 
Dries committed
44
  UNIQUE KEY title (title)
45
)
46
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
47 48 49 50 51 52 53 54

--
-- 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',
55
  PRIMARY KEY (fid,cid)
56
)
57
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
58 59 60 61 62 63 64 65

--
-- 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',
66
  PRIMARY KEY (iid,cid)
67
)
68
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

--
-- 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',
86
  PRIMARY KEY (fid),
Dries's avatar
 
Dries committed
87 88
  UNIQUE KEY link (url),
  UNIQUE KEY title (title)
89
)
90
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
91 92 93 94 95 96 97 98 99 100 101 102 103

--
-- 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,
104
  PRIMARY KEY (iid)
105
)
106
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
107

Kjartan's avatar
Kjartan committed
108 109 110
--
-- Table structure for table 'authmap'
--
111 112 113 114 115 116

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 '',
117
  PRIMARY KEY (aid),
118
  UNIQUE KEY authname (authname)
119
)
120
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
121

Kjartan's avatar
Kjartan committed
122 123 124
--
-- Table structure for table 'blocks'
--
125

Dries's avatar
 
Dries committed
126
CREATE TABLE blocks (
Dries's avatar
 
Dries committed
127
  module varchar(64) DEFAULT '' NOT NULL,
Dries's avatar
 
Dries committed
128
  delta varchar(32) NOT NULL default '0',
129
  theme varchar(255) NOT NULL default '',
Dries's avatar
 
Dries committed
130 131
  status tinyint(2) DEFAULT '0' NOT NULL,
  weight tinyint(1) DEFAULT '0' NOT NULL,
132
  region varchar(64) DEFAULT 'left' NOT NULL,
Dries's avatar
 
Dries committed
133
  custom tinyint(2) DEFAULT '0' NOT NULL,
134 135
  throttle tinyint(1) DEFAULT '0' NOT NULL,
  visibility tinyint(1) DEFAULT '0' NOT NULL,
136
  pages text DEFAULT '' NOT NULL
137
)
138
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
139

Kjartan's avatar
Kjartan committed
140 141 142
--
-- Table structure for table 'book'
--
143

Dries's avatar
 
Dries committed
144
CREATE TABLE book (
145
  vid int(10) unsigned NOT NULL default '0',
146 147 148
  nid int(10) unsigned NOT NULL default '0',
  parent int(10) NOT NULL default '0',
  weight tinyint(3) NOT NULL default '0',
149 150
  PRIMARY KEY (vid),
  KEY nid (nid),
Dries's avatar
 
Dries committed
151
  KEY parent (parent)
152
)
153
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
154

Kjartan's avatar
Kjartan committed
155 156 157
--
-- Table structure for table 'boxes'
--
158

Dries's avatar
 
Dries committed
159
CREATE TABLE boxes (
160 161
  bid tinyint(4) NOT NULL auto_increment,
  title varchar(64) NOT NULL default '',
Dries's avatar
 
Dries committed
162
  body longtext,
163
  info varchar(128) NOT NULL default '',
164
  format int(4) NOT NULL default '0',
165
  PRIMARY KEY (bid),
Kjartan's avatar
Kjartan committed
166
  UNIQUE KEY info (info)
167
)
168
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
169

Kjartan's avatar
Kjartan committed
170 171 172
--
-- Table structure for table 'cache'
--
173

Dries's avatar
 
Dries committed
174
CREATE TABLE cache (
175
  cid varchar(255) NOT NULL default '',
176
  data longblob,
177
  expire int(11) NOT NULL default '0',
Dries's avatar
 
Dries committed
178
  created int(11) NOT NULL default '0',
Dries's avatar
Dries committed
179
  headers text,
180
  PRIMARY KEY (cid),
181
  INDEX expire (expire)
182
)
183
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
184

Kjartan's avatar
Kjartan committed
185 186 187
--
-- Table structure for table 'comments'
--
188

Dries's avatar
 
Dries committed
189
CREATE TABLE comments (
190 191 192 193 194
  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
195
  comment longtext NOT NULL,
196 197
  hostname varchar(128) NOT NULL default '',
  timestamp int(11) NOT NULL default '0',
Kjartan's avatar
Kjartan committed
198 199
  score mediumint(9) NOT NULL default '0',
  status tinyint(3) unsigned NOT NULL default '0',
200
  format int(4) NOT NULL default '0',
201
  thread varchar(255) NOT NULL,
Dries's avatar
 
Dries committed
202
  users longtext,
Dries's avatar
 
Dries committed
203 204 205
  name varchar(60) default NULL,
  mail varchar(64) default NULL,
  homepage varchar(255) default NULL,
206
  PRIMARY KEY (cid),
207
  KEY lid (nid)
208
)
209
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
210

211
--
212 213 214 215
-- Table structre for table 'contact'
--

CREATE TABLE contact (
216
  cid int(10) unsigned NOT NULL auto_increment,
Dries's avatar
Dries committed
217
  category varchar(255) NOT NULL default '',
218
  recipients longtext NOT NULL default '',
Dries's avatar
Dries committed
219
  reply longtext NOT NULL default '',
220 221
  weight tinyint(3) NOT NULL default '0',
  selected tinyint(1) NOT NULL default '0',
222 223
  PRIMARY KEY (cid),
  UNIQUE KEY category (category)
224
)
225
DEFAULT CHARACTER SET utf8;
226 227 228

--
-- Table structre for table 'node_comment_statistics'
229 230 231 232 233
--

CREATE TABLE node_comment_statistics (
  nid int(10) unsigned NOT NULL auto_increment,
  last_comment_timestamp int(11) NOT NULL default '0',
234
  last_comment_name varchar(60) default NULL,
235 236 237 238
  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)
239
)
240
DEFAULT CHARACTER SET utf8;
241

Kjartan's avatar
Kjartan committed
242
--
243
-- Table structure for table 'client'
Kjartan's avatar
Kjartan committed
244
--
Dries's avatar
 
Dries committed
245

246 247
CREATE TABLE client (
  cid int(10) unsigned NOT NULL auto_increment,
248 249 250
  link varchar(255) NOT NULL default '',
  name varchar(128) NOT NULL default '',
  mail varchar(128) NOT NULL default '',
Dries's avatar
 
Dries committed
251 252
  slogan longtext NOT NULL,
  mission longtext NOT NULL,
253 254 255 256 257 258
  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)
259
)
260
DEFAULT CHARACTER SET utf8;
261 262 263 264 265 266 267 268 269 270

--
-- 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)
271
)
272
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
273

Dries's avatar
 
Dries committed
274 275 276 277 278
--
-- Table structure for table 'files'
--

CREATE TABLE files (
279 280
  fid int(10) unsigned NOT NULL default 0,
  nid int(10) unsigned NOT NULL default 0,
Dries's avatar
 
Dries committed
281 282 283
  filename varchar(255) NOT NULL default '',
  filepath varchar(255) NOT NULL default '',
  filemime varchar(255) NOT NULL default '',
284 285
  filesize int(10) unsigned NOT NULL default 0,
  PRIMARY KEY (fid)
286
)
287
DEFAULT CHARACTER SET utf8;
288 289 290 291 292 293 294 295 296 297 298

--
-- 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)
299
)
300
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
301

302 303 304 305 306
--
-- Table structure for table 'filter_formats'
--

CREATE TABLE filter_formats (
307
  format int(4) NOT NULL auto_increment,
308 309 310
  name varchar(255) NOT NULL default '',
  roles varchar(255) NOT NULL default '',
  cache tinyint(2) NOT NULL default '0',
311 312
  PRIMARY KEY (format),
  UNIQUE KEY (name)
313
)
314
DEFAULT CHARACTER SET utf8;
315

Dries's avatar
 
Dries committed
316 317 318 319 320
--
-- Table structure for table 'filters'
--

CREATE TABLE filters (
321
  format int(4) NOT NULL default '0',
Dries's avatar
 
Dries committed
322
  module varchar(64) NOT NULL default '',
323
  delta tinyint(2) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
324
  weight tinyint(2) DEFAULT '0' NOT NULL,
325
  INDEX (weight)
326
)
327
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
328

Dries's avatar
 
Dries committed
329 330 331 332 333 334 335 336
--
-- 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'
337
)
338
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
339

Kjartan's avatar
Kjartan committed
340 341 342 343
--
-- Table structure for table 'forum'
--

Dries's avatar
 
Dries committed
344
CREATE TABLE forum (
Kjartan's avatar
Kjartan committed
345
  nid int(10) unsigned NOT NULL default '0',
346
  vid int(10) unsigned NOT NULL default '0',
347
  tid int(10) unsigned NOT NULL default '0',
348 349
  PRIMARY KEY (vid),
  KEY nid (nid),
Kjartan's avatar
Kjartan committed
350
  KEY tid (tid)
351
)
352
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
353

Kjartan's avatar
Kjartan committed
354 355 356
--
-- Table structure for table 'history'
--
357 358 359 360 361

CREATE TABLE history (
  uid int(10) NOT NULL default '0',
  nid int(10) NOT NULL default '0',
  timestamp int(11) NOT NULL default '0',
362
  PRIMARY KEY (uid,nid)
363
)
364
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
365

Kjartan's avatar
Kjartan committed
366
--
Dries's avatar
 
Dries committed
367
-- Table structure for table 'locales_meta'
Kjartan's avatar
Kjartan committed
368
--
369

Dries's avatar
 
Dries committed
370 371 372 373 374 375 376
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 '',
377
  PRIMARY KEY (locale)
378
)
379
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
380 381 382 383 384 385 386

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

CREATE TABLE locales_source (
  lid int(11) NOT NULL auto_increment,
387
  location varchar(255) NOT NULL default '',
Dries's avatar
 
Dries committed
388
  source blob NOT NULL,
389
  PRIMARY KEY (lid)
390
)
391
DEFAULT CHARACTER SET utf8;
392

Dries's avatar
 
Dries committed
393 394 395 396 397 398
--
-- Table structure for table 'locales_target'
--

CREATE TABLE locales_target (
  lid int(11) NOT NULL default '0',
399
  translation blob NOT NULL,
Dries's avatar
 
Dries committed
400 401 402 403 404 405 406
  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)
407
)
408
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
409

410 411 412 413 414 415 416 417 418
--
-- 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
419
  description varchar(255) NOT NULL default '',
420
  weight tinyint(4) NOT NULL default '0',
Dries's avatar
 
Dries committed
421
  type int(2) unsigned NOT NULL default '0',
422
  PRIMARY KEY (mid)
423
)
424
DEFAULT CHARACTER SET utf8;
425

Kjartan's avatar
Kjartan committed
426 427 428
--
-- Table structure for table 'node'
--
429

Dries's avatar
 
Dries committed
430
CREATE TABLE node (
431
  nid int(10) unsigned NOT NULL auto_increment,
432
  vid int(10) unsigned NOT NULL default '0',
433
  type varchar(32) NOT NULL default '',
434 435 436 437
  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
438
  changed int(11) NOT NULL default '0',
439 440 441
  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
442
  sticky int(2) NOT NULL default '0',
443 444
  PRIMARY KEY  (nid, vid),
  UNIQUE KEY vid (vid),
Dries's avatar
 
Dries committed
445
  KEY node_type (type(4)),
446
  KEY node_title_type (title, type(4)),
447
  KEY status (status),
Dries's avatar
 
Dries committed
448 449
  KEY uid (uid),
  KEY node_moderate (moderate),
450 451
  KEY node_promote_status (promote, status),
  KEY node_created (created),
452
  KEY node_changed (changed),
453 454
  KEY node_status_type (status, type, nid),
  KEY nid (nid)
455
)
456
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
457

458 459 460
--
-- Table structure for table `node_access`
--
Dries's avatar
 
Dries committed
461 462 463 464 465 466 467 468

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',
469
  PRIMARY KEY (nid,gid,realm)
470
)
471
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
472

473 474 475 476 477 478 479 480 481 482 483 484 485 486
--
-- 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',
487 488
  PRIMARY KEY  (vid),
  KEY nid (nid),
489
  KEY uid (uid)
490
)
491
DEFAULT CHARACTER SET utf8;
492

Dries's avatar
 
Dries committed
493 494 495 496 497 498 499 500 501 502
--
-- 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
503
  page varchar(255) default NULL,
Dries's avatar
 
Dries committed
504 505
  type varchar(128) default NULL,
  weight tinyint(1) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
506
  required tinyint(1) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
507
  register tinyint(1) DEFAULT '0' NOT NULL,
508
  visibility tinyint(1) DEFAULT '0' NOT NULL,
509
  autocomplete tinyint(1) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
510 511 512 513
  options text,
  KEY category (category),
  UNIQUE KEY name (name),
  PRIMARY KEY (fid)
514
)
515
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
516 517 518 519 520 521

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

CREATE TABLE profile_values (
522 523
  fid int(10) unsigned default '0',
  uid int(10) unsigned default '0',
Dries's avatar
 
Dries committed
524 525 526
  value text,
  KEY uid (uid),
  KEY fid (fid)
527
)
528
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
529 530


Dries's avatar
 
Dries committed
531
--
Dries's avatar
 
Dries committed
532
-- Table structure for table 'url_alias'
Dries's avatar
 
Dries committed
533 534
--

Dries's avatar
 
Dries committed
535
CREATE TABLE url_alias (
Dries's avatar
 
Dries committed
536
  pid int(10) unsigned NOT NULL auto_increment,
Dries's avatar
 
Dries committed
537 538
  src varchar(128) NOT NULL default '',
  dst varchar(128) NOT NULL default '',
539
  PRIMARY KEY (pid),
540 541
  UNIQUE KEY dst (dst),
  KEY src (src)
542
)
543
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
544

Kjartan's avatar
Kjartan committed
545 546 547
--
-- Table structure for table 'permission'
--
548 549 550

CREATE TABLE permission (
  rid int(10) unsigned NOT NULL default '0',
Dries's avatar
 
Dries committed
551
  perm longtext,
552 553
  tid int(10) unsigned NOT NULL default '0',
  KEY rid (rid)
554
)
555
DEFAULT CHARACTER SET utf8;
556

Kjartan's avatar
Kjartan committed
557 558 559
--
-- Table structure for table 'poll'
--
560

561
CREATE TABLE poll (
562 563 564
  nid int(10) unsigned NOT NULL default '0',
  runtime int(10) NOT NULL default '0',
  active int(2) unsigned NOT NULL default '0',
565
  PRIMARY KEY (nid)
566
)
567
DEFAULT CHARACTER SET utf8;
568

569 570 571 572 573 574
--
-- Table structure for table 'poll_votes'
--

CREATE TABLE poll_votes (
  nid int(10) unsigned NOT NULL,
Dries's avatar
Dries committed
575
  uid int(10) unsigned NOT NULL default 0,
576
  chorder int(10) NOT NULL default -1,
Dries's avatar
Dries committed
577
  hostname varchar(128) NOT NULL default '',
578 579 580
  INDEX (nid),
  INDEX (uid),
  INDEX (hostname)
581
)
582
DEFAULT CHARACTER SET utf8;
583

Kjartan's avatar
Kjartan committed
584 585 586
--
-- Table structure for table 'poll_choices'
--
587

588
CREATE TABLE poll_choices (
589 590 591 592 593
  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',
594
  PRIMARY KEY (chid),
Kjartan's avatar
Kjartan committed
595
  KEY nid (nid)
596
)
597
DEFAULT CHARACTER SET utf8;
598

Kjartan's avatar
Kjartan committed
599 600 601
--
-- Table structure for table 'role'
--
602

Dries's avatar
 
Dries committed
603
CREATE TABLE role (
604 605
  rid int(10) unsigned NOT NULL auto_increment,
  name varchar(32) NOT NULL default '',
606
  PRIMARY KEY (rid),
607
  UNIQUE KEY name (name)
608
)
609
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
610

611 612 613 614 615 616 617 618 619 620 621
--
-- 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 */ ;

622 623 624 625 626 627 628 629
--
-- 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)
630
)
631
DEFAULT CHARACTER SET utf8;
632

Kjartan's avatar
Kjartan committed
633 634 635
--
-- Table structure for table 'search_index'
--
636 637

CREATE TABLE search_index (
Kjartan's avatar
Kjartan committed
638
  word varchar(50) NOT NULL default '',
639
  sid int(10) unsigned NOT NULL default '0',
Kjartan's avatar
Kjartan committed
640
  type varchar(16) default NULL,
641 642
  fromsid int(10) unsigned NOT NULL default '0',
  fromtype varchar(16) default NULL,
643 644 645
  score float default NULL,
  KEY sid_type (sid, type),
  KEY from_sid_type (fromsid, fromtype),
646
  KEY word (word)
647
)
648
DEFAULT CHARACTER SET utf8;
649 650 651 652 653 654 655

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

CREATE TABLE search_total (
  word varchar(50) NOT NULL default '',
656
  count float default NULL,
657
  PRIMARY KEY (word)
658
)
659
DEFAULT CHARACTER SET utf8;
Kjartan's avatar
Kjartan committed
660

Dries's avatar
 
Dries committed
661
--
662
-- Table structure for table 'sessions'
Dries's avatar
 
Dries committed
663 664 665 666 667 668 669 670
--


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',
671
  cache int(11) NOT NULL default '0',
Dries's avatar
 
Dries committed
672
  session longtext,
Dries's avatar
 
Dries committed
673
  KEY uid (uid),
674
  PRIMARY KEY (sid),
Dries's avatar
 
Dries committed
675
  KEY timestamp (timestamp)
676
)
677
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
678

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

CREATE TABLE sequences (
  name varchar(255) NOT NULL default '',
  id int(10) unsigned NOT NULL default '0',
686
  PRIMARY KEY (name)
687
)
688
DEFAULT CHARACTER SET utf8;
689

Kjartan's avatar
Kjartan committed
690
--
Dries's avatar
 
Dries committed
691
-- Table structure for table 'node_counter'
Kjartan's avatar
Kjartan committed
692 693
--

Dries's avatar
 
Dries committed
694
CREATE TABLE node_counter (
695
  nid int(10) NOT NULL default '0',
Kjartan's avatar
Kjartan committed
696 697 698
  totalcount bigint(20) unsigned NOT NULL default '0',
  daycount mediumint(8) unsigned NOT NULL default '0',
  timestamp int(11) unsigned NOT NULL default '0',
699
  PRIMARY KEY (nid),
Kjartan's avatar
Kjartan committed
700 701 702
  KEY totalcount (totalcount),
  KEY daycount (daycount),
  KEY timestamp (timestamp)
703
)
704
DEFAULT CHARACTER SET utf8;
Kjartan's avatar
Kjartan committed
705 706 707 708

--
-- Table structure for table 'system'
--
709 710 711 712 713 714 715

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
716
  throttle tinyint(1) DEFAULT '0' NOT NULL,
Dries's avatar
 
Dries committed
717
  bootstrap int(2) NOT NULL default '0',
718
  schema_version smallint(3) NOT NULL default -1,
719 720 721
  weight int(2) NOT NULL default '0',
  PRIMARY KEY (filename),
  KEY (weight)
722
)
723
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
724

Kjartan's avatar
Kjartan committed
725 726 727
--
-- Table structure for table 'term_data'
--
728 729 730 731 732

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
733
  description longtext,
734
  weight tinyint(4) NOT NULL default '0',
735
  PRIMARY KEY (tid),
736
  KEY vid (vid)
737
)
738
DEFAULT CHARACTER SET utf8;
739

Kjartan's avatar
Kjartan committed
740 741 742
--
-- Table structure for table 'term_hierarchy'
--
743 744 745 746 747

CREATE TABLE term_hierarchy (
  tid int(10) unsigned NOT NULL default '0',
  parent int(10) unsigned NOT NULL default '0',
  KEY tid (tid),
748 749
  KEY parent (parent),
  PRIMARY KEY (tid, parent)
750
)
751
DEFAULT CHARACTER SET utf8;
752

Kjartan's avatar
Kjartan committed
753 754 755
--
-- Table structure for table 'term_node'
--
756 757 758 759 760

CREATE TABLE term_node (
  nid int(10) unsigned NOT NULL default '0',
  tid int(10) unsigned NOT NULL default '0',
  KEY nid (nid),
761 762
  KEY tid (tid),
  PRIMARY KEY (tid,nid)
763
)
764
DEFAULT CHARACTER SET utf8;
765

Kjartan's avatar
Kjartan committed
766 767 768
--
-- Table structure for table 'term_relation'
--
769 770 771 772 773 774

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)
775
)
776
DEFAULT CHARACTER SET utf8;
777

Kjartan's avatar
Kjartan committed
778 779 780
--
-- Table structure for table 'term_synonym'
--
781 782 783 784 785 786

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))
787
)
788
DEFAULT CHARACTER SET utf8;
789

Kjartan's avatar
Kjartan committed
790 791 792
--
-- Table structure for table 'users'
--
793

Dries's avatar
 
Dries committed
794
CREATE TABLE users (
Dries's avatar
 
Dries committed
795
  uid int(10) unsigned NOT NULL default '0',
796 797 798 799 800 801 802 803
  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
804
  created int(11) NOT NULL default '0',
805
  access int(11) NOT NULL default '0',
806
  login int(11) NOT NULL default '0',
807 808
  status tinyint(4) NOT NULL default '0',
  timezone varchar(8) default NULL,
Dries's avatar
 
Dries committed
809
  language varchar(12) NOT NULL default '',
Dries's avatar
 
Dries committed
810
  picture varchar(255) NOT NULL DEFAULT '',
811
  init varchar(64) default '',
Dries's avatar
 
Dries committed
812
  data longtext,
813
  PRIMARY KEY (uid),
Kjartan's avatar
Kjartan committed
814
  UNIQUE KEY name (name),
815
  KEY access (access)
816
)
817
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
818

Dries's avatar
 
Dries committed
819 820 821 822 823 824 825 826
--
-- 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)
827
)
828
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
829

Kjartan's avatar
Kjartan committed
830 831 832
--
-- Table structure for table 'variable'
--
833

Dries's avatar
 
Dries committed
834
CREATE TABLE variable (
Dries's avatar
 
Dries committed
835
  name varchar(48) NOT NULL default '',
Dries's avatar
 
Dries committed
836
  value longtext NOT NULL,
837
  PRIMARY KEY (name)
838
)
839
DEFAULT CHARACTER SET utf8;
Dries's avatar
 
Dries committed
840

Kjartan's avatar
Kjartan committed
841 842 843
--
-- Table structure for table 'vocabulary'
--
844 845 846 847

CREATE TABLE vocabulary (
  vid int(10) unsigned NOT NULL auto_increment,
  name varchar(255) NOT NULL default '',
Dries's avatar
 
Dries committed
848
  description longtext,
849
  help varchar(255) NOT NULL default '',
850 851 852 853
  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
854
  tags tinyint(3) unsigned NOT NULL default '0',
855
  module varchar(255) NOT NULL default '',
856
  weight tinyint(4) NOT NULL default '0',
857
  PRIMARY KEY (vid)
858
)
859
DEFAULT CHARACTER SET utf8;
860

Dries's avatar
 
Dries committed
861 862 863