Fork me on GitHub
#duct
<
2018-04-21
>
myguidingstar09:04:42

I want to override the behavior of :duct.migrator.ragtime/sql a little bit, so in my dev.clj I have

(derive ::foo :duct/module)

(defmethod ig/init-key ::foo
  [[_ k] opts]
  (ig/init-key [:duct.migrator.ragtime/sql k] opts))

myguidingstar09:04:34

and in my cofig.edn:

[:dev/foo :my-migration-key] {:up "..." :down "..."}

myguidingstar09:04:15

but the system failed to start and threw:

ClassCastException clojure.lang.PersistentVector cannot be cast to clojure.lang.Keyword  clojure.lang.Keyword.compareTo (Keyword.java:114)

myguidingstar09:04:29

how do I fix this?

dadair20:04:47

Modules are supposed to return a function that takes the full config map and returns a transformed config map

dadair20:04:50

I’m not quite sure what you are trying to achieve though

dadair20:04:06

Can you provide more information about what you are trying to accomplish?