   [f & lists]
   (apply mapv f lists) nil)
 
-(defn convert-metadata 
+(defn convert-metadata
   "Reads stringified metadata into a clojure map."
   [m]
   (let [metadata (:metadata m)]

      (doseq [s sensors]
        (let [measurements (measurements/all-measurements store s)]
          (when measurements
            (doseq [m measurements] 
               (db/execute session
                           (hayt/update :measurements
                                        (hayt/set-columns :reading_metadata (convert-metadata m))
                                        (hayt/where [[= :device_id (:device_id m)]
                                                     [= :type (:type m)]
                                                     [= :month (:month m)]
                                                     [= :timestamp (:timestamp m)]])))))))))
  (log/info "Finished migrating reading metadata."))

(defn fill-sensor-bounds

      (clojure.walk/stringify-keys (read-string metadata))
      nil)))

(defn migrate-reading-metadata
  "Works on a lazy sequence of all measurements for all sensors in the database and
  populates (new) reading_metadata with data coming from (old) metadata."
  [{:keys [store]}]
