summaryrefslogtreecommitdiff
path: root/src/chef/database.clj
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-05-25 16:49:24 +0200
committerTim <contact@bytim.eu>2025-05-25 16:49:24 +0200
commit3c4f9feb1a9ef05f1175c3cd6c16081e4ebabd4b (patch)
tree4fd627a4fad4eaed51146b58798d3de71bcbb716 /src/chef/database.clj
parentaaf4304c7cf6259fc00366608ce643cf9697a887 (diff)
downloadchef-3c4f9feb1a9ef05f1175c3cd6c16081e4ebabd4b.tar.xz
chef-3c4f9feb1a9ef05f1175c3cd6c16081e4ebabd4b.zip
Store root question in db
Diffstat (limited to 'src/chef/database.clj')
-rw-r--r--src/chef/database.clj6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chef/database.clj b/src/chef/database.clj
index ec5d89d..af34b72 100644
--- a/src/chef/database.clj
+++ b/src/chef/database.clj
@@ -2,11 +2,13 @@
(:require [honey.sql :as sql]
[next.jdbc :as jdbc]
- [chef.database.init :as cdinit]))
+ [chef.database.init :as cdinit]
+ [chef.database.root-category :as cdroot-category]))
(def db (delay (jdbc/get-datasource {:dbtype "sqlite" :dbname "chef.db"})))
-(def ^:private patches {"init" cdinit/exec!})
+(def ^:private patches {"init" cdinit/exec!
+ "root-category" cdroot-category/exec!})
(defn run-patches! []
(->> (sql/format {:create-table [:applied-patches :if-not-exists]
:with-columns [[:name :text]]})