decir/install.sql
author dan@fuhry
Wed, 13 Jun 2007 22:33:54 -0400
changeset 0 0417a5a0c7be
child 1 6f8b7c6fac02
permissions -rw-r--r--
Initial repository population
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
     1
CREATE TABLE decir_forums(
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
     2
  forum_id int(12) unsigned NOT NULL auto_increment,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
     3
  forum_type tinyint(2) unsigned NOT NULL DEFAULT 1,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
     4
  forum_name varchar(255) NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
     5
  forum_desc text NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
     6
  parent int(12) unsigned NOT NULL DEFAULT 0,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
     7
  forum_order int(12) unsigned NOT NULL DEFAULT 1,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
     8
  last_post_id int(18) unsigned,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
     9
  last_post_topic int(12) unsigned,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    10
  last_post_user int(12) unsigned,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    11
  num_topics int(15) unsigned,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    12
  num_posts int(18) unsigned,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    13
  forum_extra text,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    14
  PRIMARY KEY ( forum_id )
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    15
);
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    16
CREATE TABLE decir_topics(
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    17
  topic_id int(15) unsigned NOT NULL auto_increment,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    18
  forum_id int(12) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    19
  topic_title varchar(255) NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    20
  topic_icon tinyint(3) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    21
  topic_starter int(12) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    22
  topic_type tinyint(2) unsigned NOT NULL DEFAULT 1,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    23
  topic_locked tinyint(1) unsigned NOT NULL DEFAULT 0,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    24
  topic_moved tinyint(1) unsigned NOT NULL DEFAULT 0,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    25
  timestamp int(11) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    26
  PRIMARY KEY ( topic_id )
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    27
);
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    28
CREATE TABLE decir_posts(
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    29
  post_id bigint(18) unsigned NOT NULL auto_increment,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    30
  topic_id bigint(15) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    31
  poster_id int(12) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    32
  poster_name varchar(255) NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    33
  timestamp int(11) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    34
  last_edited_by int(12) unsigned DEFAULT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    35
  edit_count int(5) unsigned,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    36
  edit_reason varchar(255),
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    37
  PRIMARY KEY ( post_id )
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    38
);
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    39
CREATE TABLE decir_posts_text(
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    40
  post_id bigint(18) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    41
  post_text longtext NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    42
  bbcode_uid varchar(10) NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    43
  PRIMARY KEY ( post_id )
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    44
);
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    45
CREATE TABLE decir_hits(
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    46
  hit_id bigint(21) unsigned NOT NULL auto_increment,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    47
  user_id int(12) unsigned NOT NULL DEFAULT 1,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    48
  topic_id bigint(15) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    49
  timestamp int(11) unsigned NOT NULL,
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    50
  PRIMARY KEY ( hit_id )
0417a5a0c7be Initial repository population
dan@fuhry
parents:
diff changeset
    51
);