Hello, I created a new duct project using
lein new duct foobar +postgres
Then I added [duct/migrator.ragtime "0.3.2"]
to :dependencies
Next I modified dev/config.edn to add the following key:
[:duct.migrator.ragtime/sql :foo.migration/create-foo-table]
{:up ["CREATE TABLE foo (id int);"]
:down ["DROP TABLE foo;"]}}
But when I ran (dev)
(go)
no migrations are created in ragtime_migrations?In the log file, I can see that the ragtime is trying to read from the migrations table:
INFO [duct.database.sql.hikaricp:30] - :duct.database.sql/query {:query ["SELECT id FROM ragtime_migrations ORDER BY created_at"], :elapsed 1}
Okay, I’ve fixed the above, now I’m trying to add a top-level duct module
So I’m following the instructions from:
https://github.com/duct-framework/duct/wiki/Configuration#top-level-components
But when I included this (derive :myapp/scheduler :duct/daemon)
there’s an error:
:reloading (myapp.scheduler)
:error-while-loading myapp.scheduler
#error {
:cause "Assert failed: (or (class? tag) (and (instance? clojure.lang.Named tag) (namespace tag)))"
:via
If I remove the (derive)
function, it runs when reloaded, but the ig/init-key
doesn’t seem to be called
I’ve specified this in duct_hierarchy.edn:
{:myapp/scheduler [:duct/daemon]}
Anyway, found the error, its a typo somewhere