Permalink
Browse files

Using lobos *reload-migrations* var to work around budu/lobos#51 (com…

  • Loading branch information...
harob committed Nov 21, 2012
1 parent 7e593d6 commit f7da86e38b62bace186c42fc8a91d516368a8cc3
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/leiningen/lobos.clj
View
@@ -7,14 +7,16 @@
(eval-in-project project
`(do
(lobos.connectivity/open-global (assoc lobos.config/db :unsafe true)) ; Establish a connection only when none exists (unsafe true)
- (lobos.core/migrate))
- '(require 'lobos.config 'lobos.core 'lobos.connectivity)))
+ (binding [lobos.migration/*reload-migrations* false]
+ (lobos.core/migrate)))
+ '(require 'lobos.config 'lobos.core 'lobos.connectivity 'lobos.migration)))
(defn rollback [project]
(eval-in-project project
`(do
(lobos.connectivity/open-global (assoc lobos.config/db :unsafe true)) ; Establish a connection only when none exists (unsafe true)
- (lobos.core/rollback))
+ (binding [lobos.migration/*reload-migrations* false]
+ (lobos.core/rollback)))
'(require 'lobos.config 'lobos.core 'lobos.connectivity)))
(defn lobos
@@ -27,4 +29,4 @@
(case subtask
"migrate" (leiningen.lobos/migrate project)
"rollback" (leiningen.lobos/rollback project)
- (println (help-for "lobos")))))
+ (println (help-for "lobos")))))

0 comments on commit f7da86e

Please sign in to comment.