diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-28 16:30:02 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-28 16:30:02 +0100 |
| commit | a62ab5c6dacaddb67931d7ac160bc7faaa707737 (patch) | |
| tree | a35fa3540fbb89f575ab1ea72f9b23ace399e01c /crates/rocie-server/src/storage/migrate/sql/0->1.sql | |
| parent | chore(crates/rocie-client): Re-generate (diff) | |
| download | server-a62ab5c6dacaddb67931d7ac160bc7faaa707737.zip | |
feat(crates/rocie-server): Get closer to feature parity between rocie and grocy
Diffstat (limited to 'crates/rocie-server/src/storage/migrate/sql/0->1.sql')
| -rw-r--r-- | crates/rocie-server/src/storage/migrate/sql/0->1.sql | 10 |
1 files changed, 9 insertions, 1 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 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 |
