seed.unavailable
The database a seed runs against couldn't be reached, so nothing was run.
Area 14, Tools; not declinable; the next step is usually the human's.
Why Jadpo refuses it
jadpo seed applies the database's pending migrations, then runs the
seed's calls against it, each committing on its own. With no database
to reach, it stops before the first call, so a seed never runs half
against one database and half against another.
Jadpo won't start a database for you here or pick another address. Which database the records belong in, and whether its server should be running, is yours to say.
What it looks like
A project whose seed demo writes a few notes:
database/seeds/demo.jadpo:
use notes/// A few notes, for trying the app.seed { attempt notes.add_note("Buy milk") attempt notes.add_note("Book the dentist")}
DATABASE_URL, the variable the connection's setting reads, names a
database on this machine whose server isn't running:
DATABASE_URL=postgresql://localhost:5499/notes jadpo seed demo error The database main can't be reached
- reason
- Connecting to it failed, so nothing was run.
- next
- Check the database is running, then run
jadpo seedagain (human) - rule
- seed.
unavailable - help
- https://jadpo.
dev/docs/errors/seed. unavailable
(human) at the end of the next: line tells your coding agent to stop
and ask you which fix you want, because the choice is yours to make: it
decides which database server the seed runs against.
How to fix it
The question is whether the address is right.
If the address is right, start the database's server, then run the seed again:
jadpo seed demoThe seed applies the pending migrations, then writes the notes.
If the database should be the one jadpo dev starts, leave
DATABASE_URL unset and run the seed while jadpo dev is running in
another terminal:
unset DATABASE_URLjadpo seed demo
The seed finds the database jadpo dev started and writes the notes
there.
Related
Markdown for agents: /docs/errors/seed.unavailable.md.Built from Jadpo main at aee2e8f.