Splits database into a separate crate

This commit is contained in:
2025-05-30 14:31:00 +02:00
parent 3f7ed03973
commit 597a960bf1
34 changed files with 368 additions and 402 deletions

View File

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

View File

@@ -0,0 +1,9 @@
-- Your SQL goes here
create table gamenight_participant (
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)
)