forked from rust-db/barrel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
976a0e9
commit bd68815
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
``` | ||
|