mysqlclojurecompojurekorma

Couldn't get started with clojure kORMa


I am trying to use clojure kORMa with compojure, the webapp is here nepleaks.

First I added kORMa dependency

[korma "0.3.0-RC4"]

lein deps works cool, then created src/hotel/conf/datasource.clj which looks as follows :

(ns hotel.conf.datasource)
   (use [korma.db])
   (use [korma.core])
)

(defdb db (mysql {:db "nepleaks"
                     :user "root"
                     :password "mysql55"}))

(defentity users)

lein ring server is neither throwing any exception nor creating the database entity.

Am I missing something? Do I need more configuration?


Solution

  • My understanding is that Korma does not create the database nor the database tables for you, so you need to create them beforehand manually.