From a005add5513182abb0b1230cf514c7a45b290e4b Mon Sep 17 00:00:00 2001
From: Daniel Hader <dhader96@gmail.com>
Date: Sun, 10 May 2026 10:15:56 -0500
Subject: database with problem model

---
 src/database/sql/initialize.sql | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 src/database/sql/initialize.sql

(limited to 'src/database/sql/initialize.sql')

diff --git a/src/database/sql/initialize.sql b/src/database/sql/initialize.sql
new file mode 100644
index 0000000..3baf4ff
--- /dev/null
+++ b/src/database/sql/initialize.sql
@@ -0,0 +1,21 @@
+CREATE TABLE IF NOT EXISTS problem (
+    id          INTEGER PRIMARY KEY,
+    title       TEXT NOT NULL,
+    description TEXT NOT NULL
+);
+
+CREATE TABLE IF NOT EXISTS user (
+    id            INTEGER PRIMARY KEY,
+    email         TEXT UNIQUE NOT NULL,
+    username      TEXT NOT NULL,
+    password_hash TEXT NOT NULL
+);
+
+CREATE TABLE IF NOT EXISTS submission (
+    id         INTEGER PRIMARY KEY,
+    problem_id INTEGER NOT NULL,
+    user_id    INTEGER NOT NULL,
+    language   TEXT NOT NULL,
+    code       TEXT NOT NULL,
+    validated  INTEGER NOT NULL
+);
-- 
cgit v1.2.3

