Send help, im stuck in life time hell
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
1
migrations/20250913130129_attendance.down.sql
Normal file
1
migrations/20250913130129_attendance.down.sql
Normal file
@@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS attendance;
|
||||
10
migrations/20250913130129_attendance.up.sql
Normal file
10
migrations/20250913130129_attendance.up.sql
Normal 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
|
||||
);
|
||||
Reference in New Issue
Block a user