From 632eef6424d8dc8d40c2906177892697679e7b85 Mon Sep 17 00:00:00 2001
From: Joris
Date: Sat, 19 Apr 2025 12:36:38 +0200
Subject: Add ZIG server

---
 backend/src/repos/migrations/01.sql | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 backend/src/repos/migrations/01.sql

(limited to 'backend/src/repos/migrations/01.sql')

diff --git a/backend/src/repos/migrations/01.sql b/backend/src/repos/migrations/01.sql
new file mode 100644
index 0000000..cf4131d
--- /dev/null
+++ b/backend/src/repos/migrations/01.sql
@@ -0,0 +1,29 @@
+CREATE TABLE IF NOT EXISTS "users" (
+    "email" TEXT PRIMARY KEY,
+    "created_at" TEXT NOT NULL DEFAULT (datetime()),
+    "updated_at" TEXT NOT NULL DEFAULT (datetime()),
+    "password_hash" TEXT NOT NULL,
+    "name" TEXT NOT NULL,
+    "login_token" TEXT NULL
+) STRICT;
+
+CREATE TABLE IF NOT EXISTS "maps" (
+    "id" TEXT PRIMARY KEY,
+    "created_at" TEXT NOT NULL DEFAULT (datetime()),
+    "updated_at" TEXT NOT NULL DEFAULT (datetime()),
+    "name" TEXT NOT NULL
+) STRICT;
+
+CREATE TABLE IF NOT EXISTS "markers" (
+    "id" TEXT PRIMARY KEY,
+    "created_at" TEXT NOT NULL DEFAULT (datetime()),
+    "updated_at" TEXT NOT NULL DEFAULT (datetime()),
+    "map_id" TEXT NOT NULL REFERENCES maps(id),
+    "lat" REAL NOT NULL,
+    "lng" REAL NOT NULL,
+    "color" TEXT NOT NULL,
+    "name" TEXT NULL,
+    "description" TEXT NULL,
+    "icon" TEXT NULL,
+    "radius" INTEGER NULL
+) STRICT;
-- 
cgit v1.2.3

