blob: f791e39c78195d87f2cf50f3124ba887daea5166 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
(ns chef.database.init
(:require [next.jdbc :as jdbc]
[honey.sql :as sql]))
(defn exec! [db]
(jdbc/execute! db (sql/format {:create-table :categories
:with-columns [[:id :integer :auto-increment :primary-key]
[:name :text]
[:question :text]
[:children :text]
[:parent :text]]}))
(jdbc/execute! db (sql/format {:create-table :recipes
:with-columns [[:id :integer :auto-increment :primary-key]
[:category :integer]
[:title :text]
[:description :text]]})))
|