about summary refs log tree commit diff
path: root/web/converse/migrations/2018-04-08-133240_create_posts/up.sql
blob: 7cf601fa2c54b4c2a6b281402316e7b5d02813b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
CREATE TABLE threads (
  id SERIAL PRIMARY KEY,
  title VARCHAR NOT NULL,
  body TEXT NOT NULL,
  posted TIMESTAMPTZ NOT NULL
);

CREATE TABLE posts (
  id SERIAL PRIMARY KEY,
  thread SERIAL REFERENCES threads (id),
  body TEXT NOT NULL,
  posted TIMESTAMPTZ NOT NULL
);