Send help, im stuck in life time hell

This commit is contained in:
2025-09-13 20:04:24 +03:00
parent 7d88ac6db8
commit 66704b4e2e
19 changed files with 252 additions and 66 deletions

View File

@@ -2,6 +2,8 @@ CREATE TABLE IF NOT EXISTS missions (
id BIGSERIAL PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
description TEXT NOT NULL,
starting_at BIGINT NOT NULL,
estimated_length BIGINT NOT NULL,
created_at BIGINT NOT NULL,
modified_at BIGINT NOT NULL
);

View File

@@ -0,0 +1 @@
DROP TABLE IF EXISTS attendance;

View File

@@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS attendance (
id BIGSERIAL PRIMARY KEY NOT NULL,
user_id BIGINT NOT NULL,
mission_id BIGINT NOT NULL,
confirmed_at BIGINT NOT NULL,
attending BOOL NOT NULL,
CONSTRAINT fk_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL,
CONSTRAINT fk_mission FOREIGN KEY (mission_id) REFERENCES missions(id) ON DELETE CASCADE
);