2024-12-05 02:21:20 +03:00
|
|
|
-- Add up migration script here
|
|
|
|
CREATE TABLE IF NOT EXISTS "post_interaction"(
|
2025-01-28 22:38:14 +03:00
|
|
|
post_id BIGINT NOT NULL REFERENCES "post"(post_id),
|
|
|
|
user_id BIGINT NOT NULL REFERENCES "user"(user_id),
|
|
|
|
interaction_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
|
|
interaction_id BIGINT NOT NULL REFERENCES "interaction"(interaction_id),
|
|
|
|
PRIMARY KEY(post_id, user_id)
|
2025-01-19 23:47:09 +03:00
|
|
|
);
|