actaeon/migrations/sqls/20240321022354-create-user-friends-up.sql

11 lines
307 B
MySQL
Raw Permalink Normal View History

2024-03-25 01:47:52 +00:00
CREATE TABLE actaeon_user_friends (
user1 INT NOT NULL,
user2 INT NOT NULL,
PRIMARY KEY (user1, user2),
FOREIGN KEY (user1) REFERENCES aime_user(id)
ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (user2) REFERENCES aime_user(id)
ON DELETE CASCADE ON UPDATE CASCADE
);