3 releases
Uses new Rust 2024
| new 0.1.6 | May 16, 2026 |
|---|---|
| 0.1.5 | Feb 11, 2026 |
| 0.1.4 | Jan 24, 2026 |
#25 in #init
1.5MB
38K
SLoC
Drizzle CLI - Command-line interface for drizzle-rs migrations
This crate provides a standalone CLI tool for managing database migrations
using a drizzle.config.toml configuration file instead of requiring Rust code.
Quick Start
- Install the CLI:
cargo install drizzle-cli - Run
drizzle initto create adrizzle.config.toml - Run
drizzle generateto create migrations
Configuration
Create a drizzle.config.toml file in your project root (or run drizzle init):
dialect = "sqlite"
schema = "src/schema.rs"
out = "./drizzle"
[dbCredentials]
url = "./dev.db"
For PostgreSQL:
dialect = "postgresql"
schema = "src/schema.rs"
out = "./drizzle"
[dbCredentials]
url = "postgres://user:pass@localhost:5432/mydb"
Commands
drizzle init- Create a new drizzle.config.toml configuration filedrizzle generate- Generate a new migration from schema changesdrizzle generate --custom- Create an empty migration for manual SQLdrizzle status- Show migration statusdrizzle migrate- Run pending migrations (requires database connection)drizzle push- Push schema directly to database (requires database connection)drizzle introspect- Introspect database and generate snapshot (requires database connection)
Dependencies
~9–36MB
~550K SLoC