     (sql/update-or-insert-values
       "database_version" ["major IS NOT NULL"]
       (double-to-version-rec version))))
-
-
-(defn required-diff
-  [db-conf-diffs from]
-  (when-first [diff (select #(= from (:from %)) db-conf-diffs)]
-    diff))
-
-
-(defn required-diffs
-  "Returns diffs seq or nil."
-  [db-conf-diffs current-version]
-  (loop [from current-version, diffs []]
-    (if-let [diff (required-diff db-conf-diffs from)]
-      (recur (:to diff) (conj diffs diff))
-      (seq diffs))))
 
 
 (defn prepare

      [logging :as log]))

  (:use
    [clojure.set :only (select)]
    
    (clojure.contrib
      [except :only (throw-if throwf)])))


(defn tables
  "Returns all db tables."

  ([]
    (sql/with-query-results rs ["SHOW TABLES"]
      (mapcat vals (doall rs)))))


(defn get-version
