Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
adwhit committed May 31, 2023
1 parent b90b235 commit 36c44a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ Cargo.toml:
diesel-derive-enum = { version = "2.1.0", features = ["postgres"] }
```

Suppose our project has the following `diesel.toml`:
Suppose our project has the following `diesel.toml` (as generated by `diesel setup`):

``` toml
[print_schema]
file = "src/schema.rs"
custom_type_derives = ["diesel::query_builder::QueryId"]
```

And the following SQL:
Expand All @@ -79,7 +80,7 @@ Then running `$ diesel migration run` will generate code something like:
// src/schema.rs -- autogenerated

pub mod sql_types {
#[derive(diesel::sql_types::SqlType)]
#[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)]
#[diesel(postgres_type(name = "my_enum"))]
pub struct MyEnum;
}
Expand Down

0 comments on commit 36c44a2

Please sign in to comment.