From 6df299c87ba8faab75626d04392f874ec642c8dc Mon Sep 17 00:00:00 2001
From: Benedikt Peetz <benedikt.peetz@b-peetz.de>
Date: Thu, 19 Mar 2026 02:42:02 +0100
Subject: feat(rocie-server): Provide default units (and other changes)

---
 crates/rocie-server/src/storage/migrate/sql/0->1.sql | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'crates/rocie-server/src/storage/migrate/sql/0->1.sql')

diff --git a/crates/rocie-server/src/storage/migrate/sql/0->1.sql b/crates/rocie-server/src/storage/migrate/sql/0->1.sql
index ba44c68..8f99322 100644
--- a/crates/rocie-server/src/storage/migrate/sql/0->1.sql
+++ b/crates/rocie-server/src/storage/migrate/sql/0->1.sql
@@ -178,3 +178,10 @@ CREATE TABLE txn_log (
     timestamp INTEGER NOT NULL,
     operation TEXT    NOT NULL
 ) STRICT;
+
+CREATE TABLE config (
+    -- Make it impossible to insert more than one value here.
+    id           INTEGER PRIMARY KEY NOT NULL CHECK (id = 0),
+    use_defaults INTEGER             NOT NULL CHECK (use_defaults = 1 OR use_defaults = 0)
+) STRICT;
+INSERT INTO config (id, use_defaults) VALUES (0, 0);
-- 
cgit 1.4.1

