about summary refs log tree commit diff stats
path: root/crates/rocie-server/src/storage/migrate/sql
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rocie-server/src/storage/migrate/sql')
-rw-r--r--crates/rocie-server/src/storage/migrate/sql/0->1.sql7
1 files changed, 7 insertions, 0 deletions
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);