Rhinox.Cli
CLI tool for Rhinox β schema migrations, status checks, and database management.
Install
No framework information available.
README
Rhinox.Cli
A .NET global tool for managing PostgreSQL schema migrations with Rhinox.
Install
dotnet tool install --global Rhinox.Cli
Commands
rhinox migrate plan
Preview pending schema changes without writing any files.
rhinox migrate plan --schema-dir db/schema --migrations-dir db/migrations
rhinox migrate generate
Generate a migration SQL file from detected schema changes.
rhinox migrate generate --schema-dir db/schema --migrations-dir db/migrations --name "add_user_phone"
rhinox migrate apply
Apply pending migrations to a PostgreSQL database. Uses a PostgreSQL advisory lock to prevent concurrent applies.
rhinox migrate apply --connection "Host=localhost;Database=mydb;Username=postgres;Password=secret" --migrations-dir db/migrations
Apply up to a specific migration:
rhinox migrate apply --connection "..." --migrations-dir db/migrations --target "20260319"
rhinox migrate status
Show which migrations have been applied and which are pending.
rhinox migrate status --connection "Host=localhost;Database=mydb;Username=postgres;Password=secret" --migrations-dir db/migrations
Options
| Option | Description | Default |
|---|---|---|
--connection |
PostgreSQL connection string (required for apply/status) |
β |
--schema-dir |
Directory containing schema definition files | db/schema |
--migrations-dir |
Directory containing migration SQL files | db/migrations |
--name |
Custom migration name (for plan/generate) |
auto-generated |
--target |
Apply up to a specific migration prefix (for apply) |
all pending |
How it works
- Define your schema in
.sqlfiles underdb/schema/ - Run
rhinox migrate generateto diff the schema against existing migrations and produce a new migration file - Review the generated SQL β destructive operations are marked with
-- DESTRUCTIVE - Run
rhinox migrate applyto execute pending migrations inside transactions with checksum verification
Migrations are tracked in a _rhinox_migrations table created automatically in your database.
License
MIT
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.