about summary refs log tree commit diff
path: root/web/converse/migrations/2018-04-08-133240_create_posts/up.sql
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
);