From 36c44a2310674365915bd87734491227593a517d Mon Sep 17 00:00:00 2001 From: Alex Whitney Date: Wed, 31 May 2023 13:50:52 +0100 Subject: [PATCH] update README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc9f8ab..08bce4d 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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; }