diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-18 10:43:39 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-11-26 11:46:57 -0500 |
| commit | e5658d1f61415054029b66cd2f703f1f40138460 (patch) | |
| tree | c609e209f4cebc62dd985d1b773558f47eb73bf6 /README.md | |
| parent | Add is-branch main check for docs deployment (diff) | |
| download | cli-e5658d1f61415054029b66cd2f703f1f40138460.zip | |
Add support for migration dependencies
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 76 |
1 files changed, 7 insertions, 69 deletions
@@ -5,84 +5,22 @@  [](https://builds.sr.ht/~eugenetriguba/bolt/commits/main?) -Bolt is a command-line tool designed to simplify and streamline your database migration process. - -It is distributed as a standalone binary, making it easy to run anywhere without having to setup any tooling, and it is language independent. It doesn't matter what programming language you're using, you can use Bolt for any project you have. - -## Features - -- Schema migrations are written in plain SQL -- Migrations can be versioned sequentially or by creation timestamp -- All migrations run in transactions by default -- Supports up and down migrations and jumping to any particular schema version -- Supports PostgreSQL, MySQL, SQL Server, and SQLite3 - -## Quick Start - -### Install - -```bash -# Using Go -go install git.sr.ht/~eugenetriguba/bolt/cmd/bolt@v0.11.0 - -# Using Homebrew -brew tap eugenetriguba/bolt https://git.sr.ht/~eugenetriguba/homebrew-bolt -brew install bolt -``` - -### Create a migration - -```bash -bolt new -m "create users table" -``` - -### Write your migration - -Edit the generated SQL file in `migrations/`: - -```sql --- migrate:up -CREATE TABLE users ( - id SERIAL PRIMARY KEY, - name VARCHAR(255) NOT NULL, - email VARCHAR(255) NOT NULL, - created_at TIMESTAMP NOT NULL DEFAULT NOW() -); - --- migrate:down -DROP TABLE users; -``` - -### Configure and apply - -Create `bolt.toml`: - -```toml -[database] -dsn = "postgresql://user:password@localhost:5432/mydb?sslmode=disable" -driver = "postgresql" -``` - -Apply the migration: - -```bash -bolt up -``` +Bolt is a command-line tool designed to simplify and streamline your +database migration process. ## Documentation -For complete documentation, visit **[bolt.eugenetriguba.com](https://bolt.eugenetriguba.com/)** +For the full documentation, visit **[bolt.eugenetriguba.com](https://bolt.eugenetriguba.com/)** - [Installation Guide](https://bolt.eugenetriguba.com/installation/) - [Tutorial](https://bolt.eugenetriguba.com/tutorial/) - [How-To Guides](https://bolt.eugenetriguba.com/how-to/) - [Reference](https://bolt.eugenetriguba.com/reference/) - [Explanation](https://bolt.eugenetriguba.com/explanation/) - -## Contributing - -For information on how to contribute to Bolt, see the [Contributing Guide](https://bolt.eugenetriguba.com/contributing/). +- [Contributing](https://bolt.eugenetriguba.com/contributing/) ## License -MIT License - see [LICENSE](LICENSE) file for details. +MIT License + +See [LICENSE](./LICENSE) file for details. |