From 50ce8cb96b2b218751c2fc2a6b19372f51846acc Mon Sep 17 00:00:00 2001
From: Dawid Rycerz <dawid@rycerz.xyz>
Date: Mon, 14 Jul 2025 19:34:59 +0300
Subject: feat: rewrite in rust

---
 migrations/20240101000200_create_weather_thresholds.sql | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 migrations/20240101000200_create_weather_thresholds.sql

(limited to 'migrations/20240101000200_create_weather_thresholds.sql')

diff --git a/migrations/20240101000200_create_weather_thresholds.sql b/migrations/20240101000200_create_weather_thresholds.sql
new file mode 100644
index 0000000..d6ebf0d
--- /dev/null
+++ b/migrations/20240101000200_create_weather_thresholds.sql
@@ -0,0 +1,13 @@
+-- Migration: Create weather_thresholds table
+CREATE TABLE IF NOT EXISTS weather_thresholds (
+    id INTEGER PRIMARY KEY AUTOINCREMENT,
+    user_id INTEGER NOT NULL,
+    condition_type TEXT NOT NULL,
+    threshold_value REAL NOT NULL,
+    operator TEXT NOT NULL,
+    enabled BOOLEAN NOT NULL DEFAULT 1,
+    description TEXT,
+    FOREIGN KEY(user_id) REFERENCES users(id) ON DELETE CASCADE
+);
+CREATE INDEX IF NOT EXISTS idx_weather_thresholds_user_id ON weather_thresholds(user_id);
+CREATE INDEX IF NOT EXISTS idx_weather_thresholds_condition_type ON weather_thresholds(condition_type); 
\ No newline at end of file
-- 
cgit v1.2.3

