This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-31
Channels
- # beginners (153)
- # cider (30)
- # cljs-dev (8)
- # cljsrn (8)
- # clojure (105)
- # clojure-dev (6)
- # clojure-dusseldorf (5)
- # clojure-italy (6)
- # clojure-nl (3)
- # clojure-russia (34)
- # clojure-spec (23)
- # clojure-uk (54)
- # clojurescript (104)
- # core-matrix (3)
- # crypto (1)
- # cursive (17)
- # datomic (90)
- # duct (13)
- # editors (5)
- # emacs (1)
- # events (1)
- # figwheel-main (9)
- # fulcro (54)
- # hoplon (18)
- # hyperfiddle (2)
- # jobs-rus (1)
- # lein-figwheel (5)
- # leiningen (3)
- # luminus (52)
- # mount (6)
- # off-topic (22)
- # other-languages (3)
- # parinfer (7)
- # powderkeg (3)
- # re-frame (52)
- # reagent (58)
- # rum (4)
- # shadow-cljs (49)
- # spacemacs (12)
- # sql (13)
- # tools-deps (2)
- # yada (1)
Hi, what is the recomended strategy for expanding integrant keys with code. I want to load migration files from resources folder and than crate :duct.migrator/ragtime :migrations vector from them...
It sounds like you might want to write a module.
Though modules are pure, so you’d need to combine that with something side-effectful.
Actually… wait, ignore all that 🙂
Yes, so the :migrations
key in migrator.ragtime
is just a vector, so you can supply it with a reference that produces a vector of migrations when it’s initiated.
So all you need is to write a ig/init-key
method that returns a vector of Ragtime migrations.
I don’t think you don’t need a module for this. I’d forgotten that I was already thinking about this problem when I wrote the ragtime migrator to begin with.
You just need a key that returns an ordered collection of Ragtime migrations when initiated.
It might be helpfull to look into https://github.com/mariusz-jachimowicz-83/duct-migrations-auto-cfg