From 582c03eacbc73b851aa232c404be71b2cf77295a Mon Sep 17 00:00:00 2001
From: Joris
Date: Fri, 7 Feb 2025 10:35:20 +0100
Subject: Use strict mode for tables

---
 src/db/migrations/01-init.sql | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 src/db/migrations/01-init.sql

(limited to 'src/db/migrations/01-init.sql')

diff --git a/src/db/migrations/01-init.sql b/src/db/migrations/01-init.sql
new file mode 100644
index 0000000..467e481
--- /dev/null
+++ b/src/db/migrations/01-init.sql
@@ -0,0 +1,13 @@
+CREATE TABLE IF NOT EXISTS "events" (
+  "id" TEXT PRIMARY KEY, /* UUID */
+  "date" TEXT NOT NULL, /* DATE */
+  "start" TEXT NULL, /* TIME */
+  "end" TEXT NULL, /* TIME */
+  "name" TEXT NOT NULL,
+  "repetition" TEXT NULL, /* JSON */
+  "created" TEXT NOT NULL, /* DATETIME */
+  "updated" TEXT NOT NULL /* DATETIME */
+);
+
+CREATE INDEX events_date_index on events (date);
+CREATE INDEX events_repetition_index on events (repetition);
-- 
cgit v1.2.3

