Migratus doesn't find migrations in uberjar when built with deps.edn
Closed this issue · 4 comments
Hi,
I migrated my project from using lein to clj-deps. After this change migratus/migrate
no longer find new migrations. I verified this by building an uberjar with lein
instead, and then it does find the migrations.
I'm using uberdeps to build the uberjar with deps.edn. If I compare the uberjar built with lein and uberdeps I don't see any big differences:
built with deps.edn
migrations/2018110021231-x.sql
migrations/2018110021231-x.sql
built with leiningen
migrations/
migrations/2018110021231-x.sql
migrations/2018110021231-x.sql
Only difference I see is that there's a migrations/
in the leiningen uberjar above the migrations.
; my deps.edn
; ---
:paths ["src/clj" "src/cljc" "resources" "classes"]
:aliases
:uberjar {:extra-deps {uberdeps {:mvn/version "0.1.8"}}
:main-opts ["-m" "uberdeps.uberjar"]}
Is there something different I have to do with regards to migratus when building an uberjar with deps.edn instead of lein?
I don't use deps.edn myself, so unfortunately I don't know really know how the uberjar is created with uberdeps. It might be better to open an issue with the uberdeps project to see what's happening.
For what it's worth, I'm using https://github.com/seancorfield/depstar to build my uberjar and migratus seems to properly find and run migrations.
(edit spelling)
Since migratus works with both leiningen and depstar, it seems like the issue is with uberdeps, so I'm going to close it.
Anyone stumbling on this in modern times: just make sure you're running uberdeps
>= 1.0.0 and it should work as expected