pgroll
v0.0.7
Published
Postgres migration tool
Downloads
22
Maintainers
Readme
pgroll
pgroll
is a lightweight and flexible database migration tool for PostgreSQL
PostgreSQL clients currently supporting:
- [x] PostgresJS
- [ ] pg
- [ ] ...
postgresjs
client. It offers simple commands to manage your database schema changes with up
, down
, create
, and go
features.
Features
- up: Apply all pending migrations.
- down: Rollback the last applied migration.
- create: Create new migration files.
- go: Migrate the database schema to a specific version.
Installation
You can install pgroll
via npm:
npm install pgroll
Usage
Command Line Interface (CLI)
pgroll
provides a CLI to manage your database migrations. Below are the available commands:
Running the CLI
- Run Migrations Up:
npx pgroll up
- Run Migrations Down:
npx pgroll down
- Navigate to a Specific Version:
npx pgroll go <version>
- Create New Migration Files:
npx roll create <migration-name>