aboutsummaryrefslogtreecommitdiff
path: root/src/db/migrations/01-init.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/migrations/01-init.sql')
-rw-r--r--src/db/migrations/01-init.sql13
1 files changed, 13 insertions, 0 deletions
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);