Skip to content
Browse files

Fixed issue with rollback that wasn't properly reversing the order of…

… migrations.
  • Loading branch information...
1 parent 636ba7a commit 3f1eb0cc3c6739f3335f611aa5f975c384f2adc9 @budu budu committed Aug 28, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −2 src/lobos/core.clj
  2. +3 −2 src/lobos/migration.clj
View
3 src/lobos/core.clj
@@ -201,8 +201,7 @@
[(last (mig/query-migrations-table db-spec sname))]
(= 1 (count args))
(let [arg (first args)
- migs (reverse
- (mig/query-migrations-table db-spec sname))]
+ migs (mig/query-migrations-table db-spec sname)]
(cond
(integer? arg) (take arg migs)
(= arg :all) migs
View
5 src/lobos/migration.clj
@@ -231,9 +231,10 @@
(list-migrations-names)))
(defn do-migrations [db-spec sname with names & [silent]]
- (let [migrations (->> names
+ (let [filter-migs #(only % (list-migrations-names))
+ migrations (->> names
(map str)
- (only (list-migrations-names))
+ filter-migs
(when->> (= with :down) reverse)
(map symbol)
(map (partial ns-resolve *migrations-namespace*))

0 comments on commit 3f1eb0c

Please sign in to comment.
Something went wrong with that request. Please try again.