feat: post_interaction routing

This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-12-16 01:20:10 +03:00
parent 0f09dd6a82
commit b988be7056
6 changed files with 185 additions and 6 deletions

View file

@ -1,7 +1,7 @@
-- Add up migration script here
CREATE TABLE IF NOT EXISTS "post_interaction"(
interaction_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),
interaction_id BIGSERIAL NOT NULL REFERENCES "interaction"(id),
interaction_time TIMESTAMPTZ PRIMARY KEY NOT NULL UNIQUE DEFAULT NOW()
interaction_id BIGSERIAL NOT NULL REFERENCES "interaction"(id)
);