*A nice little migration tool for Postgresql.
Rove provides a fast CLI for managing your Postgres schema:
- Organize migrations in timestamped folders with
up.sql
/down.sql
- Create / drop databases, run migrations, rollbacks, status checks, schema dumps & loads
- Cross‑platform support with native builds for Linux, macOS (Intel & ARM), and Windows
# Using Homebrew
brew install wess/packages/rove
# Install globally via Bun
bun install -g .
Or as a local dev dependency:
bun add -D rove
-
Initialize your migrations directory:
rove init
-
Generate a new migration:
rove new add_users_table # creates migrations/<timestamp>_add_users_table/{up.sql,down.sql}
-
Write your
up.sql
/down.sql
files in the new folder. -
Run pending migrations:
rove up
-
Rollback the last migration:
rove down
-
Check migration status:
rove status
Command | Description |
---|---|
rove help |
Show usage information |
rove init |
Create the top‑level migrations/ folder |
rove new <name> |
Scaffold a new migration directory with up.sql and down.sql |
rove create |
Create the database specified by DATABASE_URL |
rove drop |
Drop the database specified by DATABASE_URL |
rove up |
Create DB if needed and run pending up.sql scripts |
rove migrate |
Alias for rove up |
rove rollback |
Revert the most recent down.sql script |
rove down |
Alias for rove rollback |
rove status |
Show applied vs pending migrations (supports --exit-code and --quiet ) |
rove dump [file] |
Dump the public schema to a SQL file (default: schema.sql ) |
rove load [file] |
Load a SQL schema file into the database (default: schema.sql ) |
project-root/
├─ migrations/
│ ├─ 20250515_add_users_table/
│ │ ├─ up.sql # applies changes
│ │ └─ down.sql # reverts changes
│ └─ 20250601_add_orders_table/
│ ├─ up.sql
│ └─ down.sql
- DATABASE_URL (or POSTGRES_URL) environment variable must point to your Postgres instance:
export DATABASE_URL="postgres://user:pass@host:5432/db"
- For schema dumps in Docker-only setups, set
PG_DOCKER_CONTAINER
to your container name.
- Fork the repo
- Create a feature branch
- Open a PR — tests & docs welcome!
This project is licensed under the MIT License. See LICENSE for details.