7 lines
234 B
MySQL
7 lines
234 B
MySQL
|
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)
|
||
|
);
|