Engage endpoint

This commit is contained in:
Imbus 2024-03-22 21:28:20 +01:00
parent 6fcbb92691
commit d93dc7fd89
4 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS engagements (
user_id BIGINT NOT NULL,
post_id BIGINT NOT NULL,
FOREIGN KEY (user_id) REFERENCES users (id),
FOREIGN KEY (post_id) REFERENCES posts (id),
PRIMARY KEY (user_id, post_id)
);