From 30303b34012f22cbe898dcebfd460709b206181d Mon Sep 17 00:00:00 2001
From: xengineering <me@xengineering.eu>
Date: Tue, 6 Feb 2024 19:58:49 +0100
Subject: model: Switch to very basic database schema

This simple model is used to test if it is helpful to implement the four
CRUD methods create, read, update and delete all inside the model
package.

The model package should also provide the datastructures for these
operations (well suited for the required views) aswell as tests for
them.

With this approach it should be possible to easily implement the view
and controller package because most of the logic is already inside the
model package and is tested.
---
 model/sql/testdata.sql | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

(limited to 'model/sql/testdata.sql')

diff --git a/model/sql/testdata.sql b/model/sql/testdata.sql
index f2cd6e3..e47bde9 100644
--- a/model/sql/testdata.sql
+++ b/model/sql/testdata.sql
@@ -1,13 +1,6 @@
 INSERT INTO 'recipes'
-	('id', 'title', 'portions', 'url', 'notes')
+	(id, title, portions, url, notes, created, last_changed)
 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')
+	(1, 'Pancakes', 4, 'https://example.org', 'Very fluffy', strftime('%s', 'now'), strftime('%s', 'now')),
+	(2, 'Burger', 2, 'https://xengineering.eu/git/ceres', 'Delicious!', strftime('%s', 'now'), strftime('%s', 'now'))
 ;
-- 
cgit v1.2.3-70-g09d2

