refinery_cli 0.8.4

Provides the CLI for the Refinery crate
refinery_cli-0.8.4 is not a library.

Refinery Cli

Run Refinery migrations via cli.

Installation

Install refinery_cli via cargo.

cargo install refinery_cli

Usage

Setup your database type and access credentials with setup.

refinery setup

After that, just run your migrations giving your config file with -c flag (by defaults it is the refinery.toml generated by the setup) and migrations dir with files -p $dir.

refinery migrate -c sqlite_refinery.toml -p ./sql_migrations

Running via database uri

To run migrations from a database uri (like: postgres://user_name:passwd@hostname:5432/myDB ) stored in an environment variable DB_URI.

refinery migrate -e DB_URI -p ./sql_migrations

This option is also useful when running refinery inside a docker container, where you usually have the db connection info stored as an environment variable.

For more info and migration options run.

refinery migrate --help