Configuration
There is no project file. Every command is configured by its flags, and the database is a
connection string passed with --database or read from DATABASE_URL. That is the whole
configuration surface.
Not supported yet. A
besu.config.*file, config discovery and per-environment profiles do not exist.
The connection string
--database takes a URL. The scheme chooses the backend, and the rest is handed to that
backend's pool:
An unknown scheme fails before connecting:
TLS, socket paths and pool parameters are part of the URL, because the driver passes it straight to sqlx. There are no CLI flags for them.
Environment variables
--database is the only option with an environment fallback, and the only variable is
DATABASE_URL:
An explicit flag beats the variable. In --help the variable is shown with its current value,
so [env: DATABASE_URL=] means it is unset.
besu studio reads it the same way, so a shell that already has DATABASE_URL set needs no
--database at all.
Defaults
There is no flag for a snapshot path on migrate, no input directory for generate (it
diffs against the database), and no way to point the CLI at a named environment.
What is not configurable
- The dialect. It comes from the URL scheme; there is no override.
- The journal table name. It is always
_besu_migrations. - The statement splitter. It is fixed, and its limits are described in custom migrations.
- Logging. The CLI installs no subscriber, so there is no
RUST_LOGbehaviour to set;besu studiodoes install one. - Migration naming.
generateusesNNNN_name.sqland does not consult a template.
Gotchas
- A missing
DATABASE_URLis a clap error, not a runtime error. The command prints its usage and exits before any connection attempt. DATABASE_URLis shared with everything else in the environment. A shell that exports a production URL will use it for anybesucommand that omits--database.- A SQLite typo creates a database.
sqlite:app.dbopens or creates the file, so a wrong path silently produces an empty database. - Defaults are relative to the working directory.
--dir migrationsand--out migrationsmean the directory below wherever you invoked the binary, not the crate root.
