Simple SQL migration manager for your project.
Go to file
Dmitriy Pleshevskiy 7b9f0b3060 chore: remove funding 2022-03-17 16:53:07 +03:00
.github chore: remove funding 2022-03-17 16:53:07 +03:00
.vscode feat: add mysql database supporting 2021-03-26 02:10:41 +03:00
migra chore: fix clippy warnings 2021-10-22 00:29:09 +03:00
migra_cli fix: clippy warnings 2021-08-23 10:18:03 +03:00
sample style: change case in sample schema 2021-02-22 16:28:14 +03:00
.env.sample chore: add sample env 2021-03-02 00:44:35 +03:00
.gitignore fix: supports old sqlite version in downgrade 2021-05-17 10:51:53 +03:00
CODE_OF_CONDUCT.md chore: add code of conduct 2021-02-21 18:43:27 +03:00
Cargo.toml Migra core (#11) 2021-06-13 01:39:56 +03:00
LICENSE_APACHE chore: remove appendix from apache license 2021-02-22 11:49:47 +03:00
LICENSE_MIT fix: typo in license files 2021-02-22 11:47:56 +03:00
README.md chore: add sqlite to readme 2021-05-23 13:33:12 +03:00
docker-compose.yml feat: add mysql database supporting 2021-03-26 02:10:41 +03:00

README.md

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 ✔️
MySQL mysql
Sqlite sqlite

License

Licensed under either of these: