From 3f95e0e6d62267cf8863e98f3ab7de8971a91000 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Mon, 29 Jul 2024 03:14:03 +0900
Subject: feat: add testcases table

---
 backend/schema.sql | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'backend/schema.sql')

diff --git a/backend/schema.sql b/backend/schema.sql
index f0b5b37..7f98d91 100644
--- a/backend/schema.sql
+++ b/backend/schema.sql
@@ -39,3 +39,11 @@ CREATE TABLE problems (
     title       VARCHAR(255) NOT NULL,
     description TEXT         NOT NULL
 );
+
+CREATE TABLE testcases (
+    testcase_id SERIAL PRIMARY KEY,
+    problem_id  INT    NOT NULL,
+    stdin       TEXT   NOT NULL,
+    stdout      TEXT   NOT NULL,
+    CONSTRAINT fk_problem_id FOREIGN KEY(problem_id) REFERENCES problems(problem_id)
+);
-- 
cgit v1.3.1

