                [:collection "varchar(255)"]
                [:feature_id "varchar(100)"]
                [:version "uuid"]
-               [:all_versions "uuid[]"]
                [:valid_from "timestamp without time zone"]
                [:valid_to "timestamp without time zone"]
                [:feature "text"]

                         (load-current-feature-cache db dataset collection)))
        new-current-batch-size (or (:new-current-batch-size config) (:batch-size config) 10000)
        new-current-batch (ref (clojure.lang.PersistentQueue/EMPTY))
        delete-current-batch-size (or (:update-current-batch-size config) (:batch-size config) 10000)
        delete-current-batch (ref (clojure.lang.PersistentQueue/EMPTY))
        new-history-batch-size (or (:new-history-batch-size config) (:batch-size config) 10000)
        new-history-batch (ref (clojure.lang.PersistentQueue/EMPTY))

          for-cache
          (map (fn [[ds col fid f]] [ [ds col fid]] (pg/from-json f) ) (drop 1 results))]
      for-cache)))

(defn- delete-current-sql []
  (str "DELETE FROM " (qualified-current)
