Skip to content

Commit

Permalink
Adding a basic guide for diesel
Browse files Browse the repository at this point in the history
  • Loading branch information
spacekookie committed Mar 26, 2018
1 parent 976a0e9 commit bd68815
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions guides/diesel-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Diesel setup

**Disclaimer:** the barrel crate is still in an early state of development and should not be considered "stable". Use at your own risk!

Using rust migrations (via `barrel`) with `diesel` is really simple. First, you need to add the `rust-migrations` to the features list for your `diesel` dependency. Note that currently `barrel` only supports postgres databases.


```toml
[dependencies]
diesel = { version = "1.2", features = ["rust-migrations", "postgres"] }
# ...
```

Also make sure that you installed the `diesel_cli` with the `rust-migrations` feature flag as well

```bash
~ cargo install diesel_cli --features="rust-migrations"
```

0 comments on commit bd68815

Please sign in to comment.