# Changelog 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). ## [Unreleased] ## [0.14.0] - 2026-11-14 ### Changed - Source code moved from git.sr.ht/~eugenetriguba/bolt to git.eugenetriguba.com/bolt/cli. The module path is now `git.eugenetriguba.com/bolt/cli`. - New migrations are zero-padded to four digits. ### Removed - **Migration dependencies**: The `-- depends:` directive and dependency-based ordering added in 0.12.0 have been removed. - **Timestamp versions**: Migrations are now always versioned sequentially. The `version_style` option and `BOLT_MIGRATIONS_VERSION_STYLE` have been removed. ## [0.13.1] - 2026-02-12 ### Changed - Upgraded `BurntSushi/toml` to `1.6.0` - Upgraded `jackc/pgx/v5` to `5.8.0` - Upgraded `mattn/go-sqlite3` to `1.14.34` - Upgraded `microsoft/go-mssqldb` to `1.9.6` ## [0.13.0] - 2026-02-12 ### Changed - The documentation for `bolt` now ships with it when you install it as man pages. The HTML documentation at `bolt.eugenetriguba.com` has been removed. ## [0.12.1] - 2025-12-27 ### Fixed - `-h` for the root bolt CLI was giving back mostly empty output. ## [0.12.0] - 2025-11-26 ### Added - **Migration dependencies**: Migrations can now declare dependencies on other migrations using `-- depends: version1, version2` at the top of the migration file. These dependencies determine execution order. New migrations automatically depend on current leaf migrations. Migration to dependencies: If you don't have _any_ '-- depends:' directives, all migrations will be treated as 'leaf' node migrations and simply execute in version order as before. To start using dependencies, you should backport them to all existing dependencies before doing so. ### Changed - Updated Go to version 1.24.0. - Updated database driver dependencies: - `github.com/go-sql-driver/mysql` from v1.8.0 to v1.9.3 - `github.com/jackc/pgx/v5` from v5.5.5 to v5.7.6 - `github.com/mattn/go-sqlite3` from v1.14.22 to v1.14.32 - `github.com/microsoft/go-mssqldb` from v1.7.0 to v1.9.3 - Updated `github.com/BurntSushi/toml` from v1.3.2 to v1.5.0. - Migration execution order is now determined by dependencies rather than version number. ### Removed - `flags` and `commands` subcommands. ## [0.11.0] - 2025-10-11 ### Changed - **BREAKING**: Database connection configuration now uses DSN (Data Source Name) instead of individual connection parameters. This allows for more flexibility in the connection parameters since any format and additional options supported by the driver are now supported. **Before:** ```toml [database] host = "localhost" port = "5432" user = "myuser" password = "mypassword" dbname = "mydb" driver = "postgresql" ``` **After:** ```toml [database] dsn = "postgresql://myuser:mypassword@localhost:5432/mydb?sslmode=disable" driver = "postgresql" ``` - **BREAKING**: Environment variables have been simplified to use DSN: - `BOLT_DB_HOST`, `BOLT_DB_PORT`, `BOLT_DB_USER`, `BOLT_DB_PASSWORD`, `BOLT_DB_NAME` → `BOLT_DB_DSN` - **BREAKING**: Source code was migrated from github.com/eugenetriguba/bolt to git.sr.ht/~eugenetriguba/bolt. This means the module name has also been updated to the latter. ## [0.10.1] - 2024-08-18 ### Fixed - Using a database schema with a custom migration table (e.g. `my_schema.my_table`) would lead to the table attempting to get re-created each time bolt runs and failing because it already exists. ## [0.10.0] - 2024-08-18 ### Added - Ability to customize the name of the database table that `bolt` creates for keeping track of applied migrations. ## [0.9.0] - 2024-08-10 ### Added - Execution times have been added to console output on migration apply or revert. ## [0.8.2] - 2024-03-23 ### Added - No code changes. New release is being created to be able to trigger a Github Action to release pre-compiled binaries with the release. ## [0.8.1] - 2024-03-23 ### Fixed - If a local migration with the same version already exists, bolt will now error out when listing out the migrations and indicate that there is a conflicting migration. Previously, it would ignore the first migration and use the second one with the same version. ## [0.8.0] - 2024-03-16 ### Changed - Migrations are now a single file with an upgrade and downgrade script delineated by a `-- migrate:up` or `--migrate:down` comment instead of the prior approach where the migration was a directory with a `upgrade.sql` and `downgrade.sql` file within it. - Default version style is now timestamp. - `bolt_migrations` `version` column is now a `VARCHAR(255)` instead of `CHARACTER(14)`. ## [0.7.0] - 2024-03-14 ### Changed - Renamed the following environment variables names: - `BOLT_DB_CONN_HOST` -> `BOLT_DB_HOST` - `BOLT_DB_CONN_PORT` -> `BOLT_DB_PORT` - `BOLT_DB_CONN_USER` -> `BOLT_DB_USER` - `BOLT_DB_CONN_PASSWORD` -> `BOLT_DB_PASSWORD` - `BOLT_DB_CONN_DBNAME` -> `BOLT_DB_NAME` - `BOLT_DB_CONN_DRIVER` -> `BOLT_DB_DRIVER` - Renamed the `[connection]` section of `bolt.toml` to `[database]`. ### Fixed - Panic that occurs when `bolt new` is run without a remote database connection setup. ## [0.6.0] - 2024-03-11 ### Added - Support for Microsoft SQL Server. - Support for SQLite3. ### Changed - Default the version style to sequential. ## [0.5.0] - 2024-03-10 ### Added - Support for MySQL. ### Changed - The "postgres" driver name is now called "postgresql". ## [0.4.0] - 2024-03-09 ### Changed - Replaced the lib/pq postgres driver with pgx. ## [0.3.0] - 2024-03-02 ### Added - Documentation on `bolt version` command. - Ability to use sequentially versioned or timestamp-based migration versions. - More detailed error messages to help understand when things go wrong. ### Changed - Moved `cli.Run` from `pkg` to `internal` ### Fixed - A handful of unhandled errors which were leading to some silent failures. - The migration version wasn't being parsed out and converted to its native type during sort. That is now being done, for either version style (sequential or timestamp). ## [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 - Support for environment variables to configure bolt. You may now use the TOML configuration file and/or environment variables to specify the configuration options. The environment variables will take precedence over any values set in the TOML configuration file. New environment variables - `BOLT_MIGRATIONS_DIR_PATH` - `BOLT_DB_CONN_HOST` - `BOLT_DB_CONN_PORT` - `BOLT_DB_CONN_USER` - `BOLT_DB_CONN_PASSWORD` - `BOLT_DB_CONN_DBNAME` - `BOLT_DB_CONN_DRIVER` - Support for Windows when looking up the user's bolt configuration file. Previously, as the filesystem was traversed, it would look for "/" as the root directory. - `bolt down` command to enable rollback of all migrations or optionally to a specific version. - `bolt up` now supports a `-v` or `-version` flag which allows upgrading to a specific version. - `bolt version` command to display the current version of bolt. - Support for executing migration scripts without a transaction. Use `-- bolt: no-transaction` as the first line of your migration script to disable transactions for that migration. ### Changed - `bolt_migrations` `version` column is now 14 characters long instead of 32. - `bolt migrate` has been renamed to `bolt up`. - `bolt list` has been renamed to `bolt status`. - `bolt create` has been renamed to `bolt new`. - The `up` command will now exit with a status code of 1 if it encounters an error while running a migration. Previously, it was silently failing. - `bolt status` output has been updated to be a tabular format. - `[connection]` in `bolt.toml` should now be `[bolt.db.connection]`. - `migrations_dir` in `bolt.toml` should now be in a `[bolt.migrations]` section and should now be called `directory_path`. ## [0.1.0] - 2023-12-30 ### Added - Initial release