diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2024-01-13 19:18:42 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2024-01-13 19:18:42 -0500 |
| commit | 913272fba0c6b429ef8ce9f04498ebc5d5b653be (patch) | |
| tree | 2ad900f1648fd2ac7d0b1482978b62d9ddd4e63f /README.md | |
| parent | Add ability to upgrade/downgrade to specific version (diff) | |
| download | cli-913272fba0c6b429ef8ce9f04498ebc5d5b653be.zip | |
Add command reference
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -33,6 +33,11 @@ Bolt is a command-line tool designed to simplify and streamline your database mi - [Configuration](#configuration) - [Configuration File](#configuration-file) - [Environment Variables](#environment-variables) + - [Commands](#commands) + - [`bolt new`](#bolt-new) + - [`bolt up`](#bolt-up) + - [`bolt down`](#bolt-down) + - [`bolt status`](#bolt-status) - [Explanation](#explanation) - [How Are Migration Scripts Executed?](#how-are-migration-scripts-executed) - [How Does Bolt Know What Migrations Have Been Applied?](#how-does-bolt-know-what-migrations-have-been-applied) @@ -263,6 +268,52 @@ All configuration file settings have corresponding environment variables. - `BOLT_CONNECTION_DBNAME` - `BOLT_CONNECTION_DRIVER` +### Commands + +#### `bolt new` + +```bash +$ bolt help new +new [-message|-m]: + Create a new database migration + -m string + alias for -message (default "autogenerated") + -message string + Message to use for the migration (default "autogenerated") +``` + +#### `bolt up` + +```bash +$ bolt help up +up [-version|-v]: + Apply migrations against the database + -v string + alias for -version + -version string + The version to upgrade up and including to. +``` + +#### `bolt down` + +```bash +$ bolt help up +down [-version|-v]: + Downgrade migrations against the database. + -v string + alias for -version + -version string + The version to downgrade down and including to. +``` + +#### `bolt status` + +```bash +$ bolt help status +status: + List the database migrations and their statuses +``` + ## Explanation ### How Are Migration Scripts Executed? |