This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Hello 👋
I'm currently following https://github.com/duct-framework/docs/blob/master/GUIDE.rst. I'm trying to run migrations by calling (reset)
from the integrant.repl
namespace in the REPL.
For some reason, the migrations don't run at all.. I've checked by sqlite DB and my tables arent created
My config.edn
file looks as follows
{:duct.profile/base
{:duct.core/project-ns todo
:duct.router/ataraxy
{:routes {[:get "/"] [:todo.handler/index]}}
[:duct.handler.static/ok :todo.handler/index]
{:body {:entries "/index"}}
[:duct.migrator.ragtime/sql :todo.migration/create-entries]
{:up ["CREATE TABLE entries (id INTEGER PRIMARY KEY, description TEXT)"]
:down ["DROP TABLE entries"]}
:duct.migrator/ragtime
{:migration [#ig/ref :todo.migration/create-entries]}}
:duct.profile/dev #duct/include "dev"
:duct.profile/local #duct/include "local"
:duct.profile/prod {}
:duct.module/logging {}
:duct.module.web/api
{}
:duct.module/sql
{}}
the (reset)
function in this guide is from the dev
namespace, see the dev=>
prefix in the docs
e.g.
> To apply the migration we run reset
again at the REPL:
>
dev=> (reset)
> :reloading ()
> :duct.migrator.ragtime/applying :todo.migration/create-entries#b34248fc
> :resumed
Thanks @U0GTGHX1D I actually ran (reset)
in the dev namespace
After hours of looking at my config, I have noticed that https://clojurians.slack.com/archives/C5K1SHR6X/p1685868268690129?thread_ts=1685868251.377709&cid=C5K1SHR6X, I needed migrations
and not migration
:face_holding_back_tears: :face_holding_back_tears: