From 125e26b4d5c986f8531c098ecd5d291c1e1c7a76 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 11 Aug 2024 20:39:48 +0900
Subject: feat(backend): make `games.problem_id` non-null

---
 backend/schema.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'backend/schema.sql')

diff --git a/backend/schema.sql b/backend/schema.sql
index 2779eaf..dc49363 100644
--- a/backend/schema.sql
+++ b/backend/schema.sql
@@ -37,7 +37,7 @@ CREATE TABLE games (
     duration_seconds INT          NOT NULL,
     created_at       TIMESTAMP    NOT NULL DEFAULT NOW(),
     started_at       TIMESTAMP,
-    problem_id       INT,
+    problem_id       INT          NOT NULL,
     CONSTRAINT fk_problem_id FOREIGN KEY(problem_id) REFERENCES problems(problem_id)
 );
 CREATE INDEX idx_games_problem_id ON games(problem_id);
-- 
cgit v1.2.3-70-g09d2

