FrostByte/server/migrations/0005_engagements_table.sql
2024-03-22 21:28:20 +01:00

7 lines
No EOL
234 B
SQL

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)
);