summaryrefslogtreecommitdiff
path: root/src/schema.sql
blob: 0a89f7512e2fef172d5abfd8f394cd37413aa18a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CREATE TABLE posts (
  post_id MEDIUMINT UNSIGNED,
  message_id VARCHAR(255) NOT NULL,
  in_reply_to VARCHAR(255),
  edit_id MEDIUMINT NOT NULL AUTO_INCREMENT,
  UNIQUE KEY (message_id),
  PRIMARY KEY (edit_id),
  INDEX (post_id)
);

CREATE TABLE forums (
  list_name VARCHAR(255) NOT NULL,
  forum_id MEDIUMINT UNSIGNED NOT NULL,
  PRIMARY KEY (list_name)
);

CREATE TABLE lists (
  list_name VARCHAR(255) NOT NULL,
  forum_id MEDIUMINT UNSIGNED NOT NULL,
  PRIMARY KEY (forum_id)
);