Hi, new to duct, any idea why I get db-spec null is missing a required parameter
when adding the following at the end of config.edn
of a fresh lein new duct simple-api +api +ataraxy +example +sqlite
?
:duct.migrator/ragtime
{:migrations [#ig/ref :simple-api.migration/example]}
[:duct.migrator.ragtime/sql :simple-api.migration/example]
{:up ["CREATE TABLE example (id int)"]
:down ["DROP TABLE example"]}
I did the lein duct setup
This was at the REPL, and the template did generate a dev.edn
like so:
{:duct.database/sql
{:connection-uri "jdbc:sqlite:db/dev.sqlite"}}
alternatively: any tips on how to debug duct configs?
It might be because migrations should be in profile
The first level of config is for profiles and module configs.
well they are in base profile
let me check
oh they're not.... good catch
https://github.com/jahson/blog-film-ratings/blob/master/resources/film_ratings/config.edn here's an example that should work
great, was looking for a recent example, thanks @jahson
I'v ported the original code to new version of duct
.
Hitting another hurdle with duct.database.sql.Boundary cannot be cast to clojure.lang.IFn
...
Even after removing all my custom handlers and only using the duct handler.sql
lib
Ahhh... solved by moving the :duct.database/sql
into the profile. Really, anything not beginning with :duct.module
or :duct.profile
must be in a profile.