presentation-rust-webapps/simple_text_board/migrations/2021-01-12-011936_create_posts/up.sql

11 lines
259 B
MySQL
Raw Normal View History

2021-01-12 17:55:25 +01:00
CREATE TABLE posts (
id INTEGER NOT NULL PRIMARY KEY,
parent INTEGER,
timestamp DATETIME NOT NULL,
author VARCHAR NOT NULL,
email VARCHAR NOT NULL,
title VARCHAR NOT NULL,
content VARCHAR NOT NULL,
FOREIGN KEY (parent) REFERENCES posts(id)
);