From a62ab5c6dacaddb67931d7ac160bc7faaa707737 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 28 Nov 2025 16:30:02 +0100 Subject: feat(crates/rocie-server): Get closer to feature parity between rocie and grocy --- crates/rocie-server/src/storage/migrate/sql/0->1.sql | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'crates/rocie-server/src/storage/migrate') 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 7f08738..664f40f 100644 --- a/crates/rocie-server/src/storage/migrate/sql/0->1.sql +++ b/crates/rocie-server/src/storage/migrate/sql/0->1.sql @@ -22,6 +22,8 @@ CREATE TABLE parents ( parent TEXT DEFAULT NULL CHECK ( id IS NOT parent ), + name TEXT UNIQUE NOT NULL, + description TEXT, FOREIGN KEY(parent) REFERENCES parents(id) ) STRICT; @@ -97,7 +99,7 @@ END; CREATE TABLE units ( id TEXT UNIQUE NOT NULL PRIMARY KEY, - unit_property TEXT UNIQUE NOT NULL, + unit_property TEXT NOT NULL, full_name_singular TEXT UNIQUE NOT NULL, full_name_plural TEXT UNIQUE NOT NULL, short_name TEXT UNIQUE NOT NULL, @@ -111,6 +113,12 @@ CREATE TABLE unit_properties ( description TEXT ) STRICT; +CREATE TABLE recipies ( + id TEXT UNIQUE NOT NULL PRIMARY KEY, + path TEXT UNIQUE NOT NULL, + content TEXT NOT NULL +) STRICT; + -- Encodes unit conversions: -- {factor} {from_unit} = 1 {to_unit} -- E.g.: 1000 g = 1 kg -- cgit 1.4.1