diff options
Diffstat (limited to 'crates/rocie-server/src/storage/migrate')
| -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 |
