    and automatically passes &rest KWARGS to `korma.core/values`.
 
    Returns newly created object by calling `sel`."
-  [entity & kwargs]
+  [entity & {:as kwargs}]
   (let [vals (->> kwargs
-                  (apply assoc {})
                   (pre-insert entity))]
     (let [{:keys [id]} (-> (insert entity (values vals))
                            (clojure.set/rename-keys {(keyword "scope_identity()") :id}))]

   `(upd User 123 :is_active false)` -> updates user with id=123, setting is_active=false

   Returns true if update modified rows, false otherwise."
  [entity entity-id & kwargs]
  (let [kwargs (->> (apply assoc {} kwargs)
                    (pre-update entity))]
    (-> (update entity (set-fields kwargs) (where {:id entity-id}))
        (> 0))))

                        :fields str/upper-case}}))

(defn migrate
  "Migrate the database `:up` or `:down.`"
  [direction]
  (let [conn (jdbc/get-connection {:subprotocol "h2"
                                   :subname db-file})]
