From e7bbadc8f469d5cbfbc012932c83d1d440b6e8a3 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 27 Dec 2023 12:39:10 +0100 Subject: model: Add initial SQL migration This provides the basic table structure to the database. --- model/sql/migrate.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 model/sql/migrate.sql (limited to 'model/sql') diff --git a/model/sql/migrate.sql b/model/sql/migrate.sql new file mode 100644 index 0000000..6ca4d0f --- /dev/null +++ b/model/sql/migrate.sql @@ -0,0 +1,14 @@ +CREATE TABLE 'recipes' ( + 'id' integer PRIMARY KEY AUTOINCREMENT, + 'title' text DEFAULT '', + 'portions' text DEFAULT '', -- FIXME has to be integer + 'url' text DEFAULT '', + 'notes' text DEFAULT '' +); + +CREATE TABLE 'recipe_steps' ( + 'id' integer PRIMARY KEY, + 'recipe_id' integer DEFAULT NULL, + 'rank' integer DEFAULT NULL, + 'text' text DEFAULT '' +); -- cgit v1.2.3-70-g09d2