ToolsCommandsCommands for the database, settings and translations
jadpo seed
On this page
Fill the development database from a seed.
Run a seed, database/seeds/<name>.jadpo, against the development database (area 5): its calls go through the app's own actions, so validation, lifecycles and policy apply, and a call that passes a caller runs as them. The database is the one --url names, else the address its connection's setting gives, else the one a running jadpo dev started. It must be on this machine: a database anywhere else may be production, and is refused before anything runs. Pending migrations are applied first. Mail lands in the dev inbox and provider calls are faked, as under jadpo dev. A failure stops the seed, and what its earlier calls committed stays.
jadpo seed [name]Arguments
name(optional): The seed's file name in database/seeds/, without .jadpo
Flags
--url <url>: The database to seed, on this machine
On every command
--json: Print data for tools instead of text--full: Show everything a report shortens--help: Show every flag, with examples--color <when>: Choose when to use colour
jadpo seed --json writes one JSON document to standard output instead of text, with the same exit code. The document has schemaVersion, command ("seed"), ok, data (what the command produced, null when it failed) and diagnostics (each error with its rule, reason, next and help). A command that needs a terminal refuses --json and names the flags that do the same job.
Examples
# Give the development database its first usersjadpo seed first_users# Seed a database named directlyjadpo seed local_demo --url postgresql://localhost/library_dev
Errors
cli.seed_arguments: Ajadpo seedcommand names no seed, one the project doesn't have, or more than oneseed.failed: A seedjadpo seedran stopped at a call that failed or faulted, and the calls before it stay in the databaseseed.production_refused: A seed was run against a database that isn't on this machine, which may be productionseed.unavailable: The database a seed runs against couldn't be reached, so nothing was runmigration.apply_failed: Applying the project's migrations to a database stopped at a step that failedmigration.drop_not_accepted: A migration removes data, and no acceptance in the project says a person agreed to itmigration.extension_missing: The project's migrations need a PostgreSQL extension, such as pgvector, that the database server doesn't offer or that the role applying them can't createmigration.extension_outdated: The database server's PostgreSQL extension, such as pgvector, is older than the project's migrations and queries needmigration.store_diverged: The migrations a database has applied don't match the project's: one has changed since it ran, the project doesn't have one, or one comes out of ordertoolchain.project_not_found: You ran a command that works on a project in a folder with noapp.jadpo, in it or in any folder above it
Markdown for agents: /docs/jadpo-seed.md.Built from Jadpo main at aee2e8f.