1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
|
# 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]
### Changed
- 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
<!-- template
## [X.Y.Z] - YYYY-MM-DD
### Added
- for new features.
### Changed
- for changes in existing functionality.
### Deprecated
- for soon-to-be removed features.
### Removed
- for now removed features.
### Fixed
- for any bug fixes.
### Security
- in case of vulnerabilities.
-->
|