This repository has been archived on 2023-07-09. You can view files and clone it, but cannot push or open issues or pull requests.
sudoscientist-go-backend/migrations/1579998283_create_comments_table.up.sql

12 lines
265 B
MySQL
Raw Permalink Normal View History

BEGIN;
CREATE TABLE IF NOT EXISTS comments (
id SERIAL PRIMARY KEY,
parent INTEGER REFERENCES posts (id),
author text REFERENCES users (username),
content text,
time_published timestamp,
modified bool,
last_modified timestamp
);
COMMIT;