feat: ✨ admin routing part 5
This commit is contained in:
parent
c3156aeb41
commit
6d3b6a4e79
35 changed files with 385 additions and 401 deletions
|
@ -1,7 +1,8 @@
|
|||
-- 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"(user_id),
|
||||
interaction_id BIGSERIAL NOT NULL REFERENCES "interaction"(id)
|
||||
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)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue