migra-cli

Crates.iomigra-cli
lib.rsmigra-cli
version0.6.0
sourcesrc
created_at2021-02-05 22:53:56.902757
updated_at2021-06-12 22:44:26.070703
descriptionSimple SQL migration manager for your project
homepagehttps://github.com/pleshevskiy/migra
repositoryhttps://github.com/pleshevskiy/migra
max_upload_size
id351345
size107,194
(pleshevskiy)

documentation

README

Migra

CI unsafe forbidden Crates.io Crates.io

Simple SQL migration manager for your project.

Install

cargo install migra-cli

If you want to use dotenv for configure migra cli, just run the following in your terminal.

cargo install migra-cli --features dotenv

Each supported database is located in separate features with a similar name. The default is postgres. For example, if you only want to work with mysql, you need to disable postgres and enable mysql.

cargo install migra-cli --no-default-features --features mysql

Usage

A few steps to get you started

  1. Initialize migra configuration (Optional)
    migra init
    
  2. Make your first migration
    migra make initial_migration
    
  3. Check applied and pending migrations
    migra ls
    
  4. Upgrade your database
    migra up
    

For more information about the commands, simply run migra help

Supported databases

Database Feature Default
Postgres postgres :heavy_check_mark:
MySQL mysql :x:
Sqlite sqlite :x:

License

Licensed under either of these:

Commit count: 137

cargo fmt