summaryrefslogtreecommitdiff
path: root/src/chef/database/init.clj
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-05-30 17:09:57 +0200
committerTim <contact@bytim.eu>2025-05-30 17:09:57 +0200
commitea7b0078478ba7925f2db3cb1fa038e8a3d85ab8 (patch)
tree41b18b1bbd073521891524ee8d32ecc381874a11 /src/chef/database/init.clj
parentd1699f9af8cb7457f248bf71197535221f3d9472 (diff)
downloadchef-ea7b0078478ba7925f2db3cb1fa038e8a3d85ab8.tar.xz
chef-ea7b0078478ba7925f2db3cb1fa038e8a3d85ab8.zip
Add features to manage recipes in admin interface
Diffstat (limited to 'src/chef/database/init.clj')
-rw-r--r--src/chef/database/init.clj9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/chef/database/init.clj b/src/chef/database/init.clj
index 7f23d27..ef4bd2f 100644
--- a/src/chef/database/init.clj
+++ b/src/chef/database/init.clj
@@ -7,9 +7,12 @@
:with-columns [[:id :integer :primary-key :autoincrement]
[:name :text]
[:question :text]
- [:parent :integer]]})) ;TODO: create root category
+ [:parent :integer]]}))
(jdbc/execute! db (sql/format {:create-table :recipes
- :with-columns [[:id :integer :auto-increment :primary-key]
+ :with-columns [[:id :integer :primary-key :autoincrement]
[:category :integer]
[:title :text]
- [:description :text]]})))
+ [:unit :integer]
+ [:ingredients :text]
+ [:preparation :text]
+ [:thumbnail :text]]})))