Refinery Logo

Powerful SQL migration toolkit for Rust.

refinery makes running migrations for different databases as easy as possible. it works by running your migrations on a provided database connection, either by embedding them on your Rust code, or via refinery_cli. currently Postgres, Rusqlite and Mysql are supported. refinery works best with Barrel but you can also have your migrations on .sql files or use any other Rust crate for schema generation.

Usage

Example

```rust,no_run use ttrusqlite::Connection;

mod embedded { use refinery::embedmigrations; embedmigrations!("refinery/tests/sql_migrations"); }

fn main() { let mut conn = Connection::openinmemory().unwrap(); embedded::migrations::runner().run(&mut conn).unwrap(); } ```

for more examples refer to the examples

Compatibility

Refinery aims to support stable Rust, the previous Rust version, and nightly

Contributing

:balloon: Thanks for your help improving the project! No contribution is too small and all contributions are valued, feel free to open Issues and submit Pull Requests

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Refinery by you, shall be licensed as MIT, without any additional terms or conditions.