summaryrefslogtreecommitdiff
path: root/model/sql
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-12-27 13:04:26 +0100
committerxengineering <me@xengineering.eu>2023-12-27 13:05:05 +0100
commit8ce328fafd9b2ad152f0afc16176cf01e1e66669 (patch)
tree94a72018f822528aa51ff8851559ad6b0dc0ac1b /model/sql
parente7bbadc8f469d5cbfbc012932c83d1d440b6e8a3 (diff)
downloadceres-8ce328fafd9b2ad152f0afc16176cf01e1e66669.tar
ceres-8ce328fafd9b2ad152f0afc16176cf01e1e66669.tar.zst
ceres-8ce328fafd9b2ad152f0afc16176cf01e1e66669.zip
model: Inject test data into database
This is useful for debugging and testing.
Diffstat (limited to 'model/sql')
-rw-r--r--model/sql/testdata.sql13
1 files changed, 13 insertions, 0 deletions
diff --git a/model/sql/testdata.sql b/model/sql/testdata.sql
new file mode 100644
index 0000000..f2cd6e3
--- /dev/null
+++ b/model/sql/testdata.sql
@@ -0,0 +1,13 @@
+INSERT INTO 'recipes'
+ ('id', 'title', 'portions', 'url', 'notes')
+VALUES
+ (1, 'Pancakes', 4, 'https://example.org', 'Very fluffy'),
+ (2, 'Burger', 2, 'https://xengineering.eu/git/ceres', 'Delicious!')
+;
+
+INSERT INTO 'recipe_steps'
+ ('id', 'recipe_id', 'rank', 'text')
+VALUES
+ (1, 1, 1, 'Stir the dough'),
+ (2, 1, 2, 'Fry pancakes')
+;