aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-01-14 00:28:36 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2024-01-14 00:28:36 -0500
commita9855d5ac39fe4573fd12843f46d97dc48f80f04 (patch)
treee312ad51c50b8c544cc5e7c494dda5e294a5b208
parentFix readme (diff)
downloadcli-a9855d5ac39fe4573fd12843f46d97dc48f80f04.zip
Fix config
-rw-r--r--CHANGELOG.md6
-rw-r--r--README.md4
-rw-r--r--internal/configloader/configloader.go4
3 files changed, 10 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c13a652..415830c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [0.2.1] - 2024-01-14
+
+### Fixed
+
+- Fixed a bug where the `bolt.toml` file was not being read for the documented format.
+
## [0.2.0] - 2024-01-13
### Added
diff --git a/README.md b/README.md
index 1b02e1d..db0b94b 100644
--- a/README.md
+++ b/README.md
@@ -254,7 +254,7 @@ Bolt attempts to find a `bolt.toml` file in your current working directory
or in any parent directory.
```toml
-[bolt.migrations]
+[migrations]
# The directory where your migration scripts are located.
# Defaults to "migrations". This directory is relative to
# the current working directory. You may also use an absolute
@@ -264,7 +264,7 @@ directory_path = "migrations"
# Connection parameters for the database Bolt will be
# applying migrations to. All connection parameters are
# required.
-[bolt.db.connection]
+[connection]
# The host to use to connect to your database.
host =
# The port to use to connect to your database.
diff --git a/internal/configloader/configloader.go b/internal/configloader/configloader.go
index 281ed1f..c50ec24 100644
--- a/internal/configloader/configloader.go
+++ b/internal/configloader/configloader.go
@@ -27,11 +27,11 @@ var errConfigFileNotFound = errors.New(
// This can come from the TOML file or environment variables,
// with environment variables taking precedence.
type Config struct {
- Migrations MigrationsConfig `toml:"bolt.migrations"`
+ Migrations MigrationsConfig `toml:"migrations"`
// Information related to how to connect to the database
// that is desired to run migrations against.
- Connection ConnectionConfig `toml:"bolt.db.connection"`
+ Connection ConnectionConfig `toml:"connection"`
}
type MigrationsConfig struct {