                                              {:message/user [:user/id]}
                                              {:message/thread [:thread/id]}])
                              :where [?e :message/id]]
-                           (d/db db/*conn*))
+                           (d/db db/conn))
                       (map first))]
     (let [msg-tx (->> messages
                       (map (fn [msg]
                              [:db/add [:message/id (msg :message/id)]
                               :message/content (msg :message/content-old)])))]
-      (d/transact db/*conn* (doall msg-tx)))))
+      (d/transact db/conn (doall msg-tx)))))
 
 (defn migrate-2015-07-29
   "Schema changes for groups"
   []
-  (d/transact db/*conn*
+  (d/transact db/conn
     [{:db/ident :tag/group
       :db/valueType :db.type/ref
       :db/cardinality :db.cardinality/one

(defn migrate-2015-12-19
  "Add user nicknames"
  []
  (d/transact db/*conn*
    [{:db/ident :user/nickname
      :db/valueType :db.type/string
      :db/cardinality :db.cardinality/one

(defn migrate-2016-03-21
  "Add user preferences"
  []
  (d/transact db/conn
    [{:db/ident :user/preferences
      :db/valueType :db.type/string
      :db/cardinality :db.cardinality/one
