Schema rewrite to split up the schema.rs file.

This commit is contained in:
2022-05-28 18:25:53 +02:00
parent 1a6ead4760
commit 5c27be0191
7 changed files with 456 additions and 400 deletions

View File

@@ -0,0 +1,3 @@
-- This file should undo anything in `up.sql`
drop table gamenight_participants;

View File

@@ -0,0 +1,9 @@
-- Your SQL goes here
create table gamenight_participants (
gamenight_id UUID NOT NULL,
user_id UUID NOT NULL,
CONSTRAINT FK_gamenight_id FOREIGN KEY (gamenight_id) REFERENCES gamenight(id) ON DELETE CASCADE,
CONSTRAINT FK_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
PRIMARY KEY(gamenight_id, user_id)
)