DEV Community

Wess Cope
Wess Cope

Posted on • Originally published at github.com

Rove : Straight up PostgreSQL migration.

Rove is a fast, no-fluff migration manager for PostgreSQL built with Bun and TypeScript. It’s built for devs who just want to write raw SQL, version it in folders, and run it with confidence.

No ORMs. No DSLs. Just SQL.


Install

Install it using Homebrew:

brew install wess/packages/rove 
Enter fullscreen mode Exit fullscreen mode

Or clone it and run directly with Bun:

bun install bun run rove migrate 
Enter fullscreen mode Exit fullscreen mode

How It Works

Migrations live in a migrations/ folder. Each migration is a directory with an incrementing number prefix and two files: up.sql and down.sql.

migrations/ ├── 001_create_users/ │ ├── up.sql │ └── down.sql ├── 002_add_index/ │ ├── up.sql │ └── down.sql 
Enter fullscreen mode Exit fullscreen mode

To run migrations:

rove migrate 
Enter fullscreen mode Exit fullscreen mode

To roll back the most recent one:

rove rollback 
Enter fullscreen mode Exit fullscreen mode

Rove tracks what's been applied in a migrations table in your database. It uses the DATABASE_URL (or POSTGRES_URL) environment variable to connect.


Commands

Here’s the full list of supported commands:

rove init # Initialize the migrations/ folder rove new <name> # Generate a new numbered migration rove create # Create the database rove drop # Drop the database rove up # Create DB if needed + run pending migrations rove migrate # Run any pending migrations rove rollback # Roll back the most recent migration rove down # Alias for rollback rove status # Show which migrations have been applied rove dump [file] # Dump current schema (default: schema.sql) rove load [file] # Load schema from file (default: schema.sql) 
Enter fullscreen mode Exit fullscreen mode

You can also run:

rove --help 
Enter fullscreen mode Exit fullscreen mode

to get usage info at any time.


Why Rove?

Most migration tools make you jump through hoops, invent YAML-based formats, or force you into their ORM. Rove does exactly one thing: it runs your SQL migrations.

  • ✅ Built with Bun for speed
  • ✅ Uses raw SQL, no wrappers
  • ✅ Fast and scriptable for CI/CD
  • ✅ Easy to version-control
  • ✅ No global state or weird config files

Whether you're starting fresh or just want something small and sharp to replace heavier tools, Rove is a solid fit.


Getting Started

rove init rove new create_users # edit up.sql / down.sql rove migrate 
Enter fullscreen mode Exit fullscreen mode

Need to reset the database?

rove drop && rove create && rove migrate 
Enter fullscreen mode Exit fullscreen mode

Want to snapshot the current schema?

rove dump 
Enter fullscreen mode Exit fullscreen mode

Final Thoughts

If you want your migrations to be transparent, versionable, and fast, Rove delivers. Built for Bun but works with anything that talks to PostgreSQL.

👉 github.com/wess/rove

Feedback, issues, and contributions always welcome.

Top comments (0)