diff options
Diffstat (limited to 'man/bolt.toml.5')
| -rw-r--r-- | man/bolt.toml.5 | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/man/bolt.toml.5 b/man/bolt.toml.5 new file mode 100644 index 0000000..15858ff --- /dev/null +++ b/man/bolt.toml.5 @@ -0,0 +1,106 @@ +.Dd February 12, 2026 +.Dt BOLT.TOML 5 +.Os +.Sh NAME +.Nm bolt.toml +.Nd bolt configuration file +.Sh DESCRIPTION +.Nm +is the configuration file for +.Xr bolt 1 . +Bolt searches for this file in the current working directory or any parent +directory until the root of the filesystem. +.Pp +Environment variables take precedence over configuration file settings if +both are set. +.Sh FILE FORMAT +The configuration file uses TOML format with two sections: +.Bl -tag -width Ds +.It Cm [migrations] +Migration-related settings. +.It Cm [database] +Database connection settings. +.El +.Sh MIGRATIONS SECTION +.Bl -tag -width Ds +.It Cm directory_path +The directory where migration scripts are located. Defaults to +.Pa migrations . +This can be a relative path (from the current working directory) or an +absolute path. +.Pp +Environment variable: +.Ev BOLT_MIGRATIONS_DIR_PATH +.It Cm version_style +The migration versioning style. +.Qq timestamp +(default) uses timestamps like +.Li 20240316145038 . +.Qq sequential +uses incrementing integers like +.Li 001 , 002 , 003 . +.Pp +Environment variable: +.Ev BOLT_MIGRATIONS_VERSION_STYLE +.El +.Sh DATABASE SECTION +.Bl -tag -width Ds +.It Cm dsn +The Data Source Name (connection string) for the database. See +.Xr bolt-databases 7 +for format details. +.Pp +Environment variable: +.Ev BOLT_DB_DSN +.It Cm driver +The database driver to use. One of: +.Qq postgresql , +.Qq mysql , +.Qq mssql , +or +.Qq sqlite3 . +.Pp +Environment variable: +.Ev BOLT_DB_DRIVER +.It Cm migrations_table +The name of the table used to track applied migrations. Defaults to +.Qq bolt_migrations . +.Pp +Environment variable: +.Ev BOLT_DB_MIGRATIONS_TABLE +.El +.Sh ENVIRONMENT +All configuration options can be set via environment variables. When both +a configuration file setting and environment variable are present, the +environment variable takes precedence. +.Pp +.Bl -column "BOLT_MIGRATIONS_VERSION_STYLE" "migrations.version_style" -offset indent +.It Sy Environment Variable Ta Sy Configuration Key +.It Ev BOLT_MIGRATIONS_DIR_PATH Ta Cm migrations.directory_path +.It Ev BOLT_MIGRATIONS_VERSION_STYLE Ta Cm migrations.version_style +.It Ev BOLT_DB_DSN Ta Cm database.dsn +.It Ev BOLT_DB_DRIVER Ta Cm database.driver +.It Ev BOLT_DB_MIGRATIONS_TABLE Ta Cm database.migrations_table +.El +.Sh EXAMPLES +A complete configuration file: +.Bd -literal -offset indent +[migrations] +directory_path = "migrations" +version_style = "timestamp" + +[database] +dsn = "postgresql://user:password@localhost:5432/mydb?sslmode=disable" +driver = "postgresql" +migrations_table = "bolt_migrations" +.Ed +.Pp +Using environment variables: +.Bd -literal -offset indent +export BOLT_DB_DSN="postgresql://user:password@localhost:5432/mydb" +export BOLT_DB_DRIVER="postgresql" +export BOLT_MIGRATIONS_DIR_PATH="db/migrations" +.Ed +.Sh SEE ALSO +.Xr bolt 1 , +.Xr bolt-databases 7 |