feat: comment routing

This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-12-15 20:56:24 +03:00
parent dc849dd970
commit 0d9cef79f3
4 changed files with 168 additions and 4 deletions

View file

@ -1,7 +1,7 @@
-- Add up migration script here
CREATE TABLE IF NOT EXISTS "comment"(
post_creation_time TIMESTAMPTZ NOT NULL REFERENCES "post"(creation_time),
creation_time TIMESTAMPTZ PRIMARY KEY NOT NULL UNIQUE DEFAULT NOW(),
post_creation_time TIMESTAMPTZ NOT NULL REFERENCES "post"(creation_time),
user_id BIGSERIAL NOT NULL REFERENCES "user"(id),
comment VARCHAR NOT NULL
);