A schema migration building API, using Diesel as a backend and integrated query builder. Write complicated SQL schema migrations in Rust!
Example
The API was recently completely changed to potentially easily allow different database backends to be used. The current iteration of the API can be seen below. Some of the functions might not fully work yet or need tweaking. In fact, a lot of the functions haven't been properly hooked up yet 😅
extern crate barrel;
use ;
use *;
Connecting with a Database
Right now only Diesel (as a backend) and PGSQL (as a database) are supported. But generally, this is what it would look like to use barrel to talk directly to a database.
// ...
let migration = sql.exec;
let mut connection = new;
connection.batch_exec;
If you have feedback regarding the API or things you would want barrel to do, please open an issue. And documentation PR's are always welcome 💚