     :ts (t/now)}))
 
 
-(defn store-hashtag [text]
+(defn store-hashtag [text db]
   (mc/insert-and-return
-   @db
+   db
    "hashtags-2"
    {:text text
     :ts (t/now)}))
 
 
-(defn store-author [{:keys [screen_name id created_at]}]
+(defn store-author [{:keys [screen_name id created_at]} db]
   (let [date (f/parse custom-formatter created_at)]
     (mc/insert-and-return
-     @db
+     db
      "authors"
      {:id id
       :name screen_name

      :ts (t/now)})))


(defn store-url [url]
  (mc/insert-and-return
   @db
   "urls-2"
   {:path url
    :ts (t/now)}))

(ns ceres-collector.migrator
  (:refer-clojure :exclude [sort find])
  (:require [clojure.java.shell :refer [sh]]
            [ceres-collector.db :refer [db news-accounts custom-formatter time-interval set-db]]
            [monger.core :as mg]
            [monger.collection :as mc]
            [monger.operators :refer :all]
