ckuttruff/clj-sql-up — pull request #7 by kitallis (2014-07-29 20:27:39+00:00)
Title: Using clojure’s (long) instead of (Long.) as (Long.) behaves strangely with boxed numerics.

I'm not exactly sure why, but my guess is some subtlety with Java interop causes this. For example:

```
user> (Long. 1)
1

user> (Long. (count ["asd"]))
1

user> (or (count ["asd"]) 2)
1

user> (or (count ["asd"]) 2)
1

user> (Long. (or (count ["foo"]) 2))
IllegalArgumentException No matching ctor found for class java.lang.Long clojure.lang.Reflector.invokeConstructor (Reflector.java:183)
```
I think because of oddity, using the `rollback` method raises an exception with expressions of this kind: `(m/rollback db-spec (count (m/completed-migrations db-spec)))`

It appears that `java.lang.Long` doesn't have a constructor that takes an object. Clojure already comes with [long](http://clojuredocs.org/clojure_core/clojure.core/long) that works with boxed numerics, so we can just use that.

I tested this locally and it appears to fix the problem. I've also upped the patch version.