tvl-depot/web/converse/migrations/2018-04-08-133240_create_posts/up.sql

14 lines
272 B
MySQL
Raw Normal View History

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
);