yogthos / migratus

MIGRATE ALL THE THINGS!
641 stars 95 forks source link

Problem upgrading from 1.3.7 to 1.3.8 #265

Closed dsbw closed 2 weeks ago

dsbw commented 2 weeks ago

Hello,

I'm a wee bit behind and was using 1.3.6 and went to upgrade and found I couldn't get past 1.3.8. This version broke my app—and not in the area of migratus! (Which I actually started to use but never got past including the library.) I assume it's the next.jdbc library, but I can't see anything in the change log that helps.

I suppose it's not really a migratus issue but maybe having worked on the next.jdbc this will pop out at someone:

UPDATE eval.assessments SET observations = JSONB_SET(observations, '{opt.nprs.mm}', '{"value":3,"at":1720563824}') WHERE id = 226387

works in 1.3.7, and in 1.3.8, the following exception gets raised:

class java.lang.Character cannot be cast to class java.lang.String (java.lang.Character and java.lang.String are in module java.base of loader 'bootstrap')
yogthos commented 2 weeks ago

Have you tried explicitly including the latest release for next.jdbc in the project? https://clojars.org/com.github.seancorfield/next.jdbc

ieugen commented 2 weeks ago

@dsbw : a full stack trace is more useful. What you shared gives no indication where the problem is triggered. A simple repro example might be even better.

dsbw commented 2 weeks ago

Have you tried explicitly including the latest release for next.jdbc in the project? https://clojars.org/com.github.seancorfield/next.jdbc

That did it, thanks!

EDIT: Whoops, spoke too soon. That helped but didn't fix everything. I'll report back in a bit.

dsbw commented 2 weeks ago

OK, found it, and it wasn't next.jdbc at all—which I guess explains why it helped but not totally fixed it. My lein.deps for using 1.3.7 versus 1.3.8:

11d10 < [org.clojure/java.jdbc "0.3.6"] 97c96,97 < [migratus "1.3.8"]

[migratus "1.3.7"] [org.clojure/java.jdbc "0.7.11"]

So, in the standard jdbc, v0.3.6 accepted a single string, and 0.7.11 requires a vector. So it was breaking up my string into ["U","P",..etc.].

Thanks for the pointer, that really helped!

yogthos commented 2 weeks ago

Ah that would do it, and glad the pointer helped!