You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

14 lines
463 B

-- Your SQL goes here
CREATE TABLE comments (
id SERIAL PRIMARY KEY,
author_hash VARCHAR NOT NULL,
author_title VARCHAR NOT NULL DEFAULT '',
is_tmp BOOLEAN NOT NULL DEFAULT FALSE,
content TEXT NOT NULL,
create_time TIMESTAMPTZ NOT NULL DEFAULT now(),
is_deleted BOOLEAN NOT NULL DEFAULT FALSE,
allow_search BOOLEAN NOT NULL DEFAULT FALSE,
post_id INTEGER NOT NULL REFERENCES posts(id)
);
CREATE INDEX comments_postId_idx ON comments (post_id);