12 lines
265 B
PL/PgSQL
12 lines
265 B
PL/PgSQL
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;
|