Repository: diesel-rs/diesel (language: rust)

Issue:
Using diesel CLI with `exclude_custom_type_definitions` has unexpected outcomes
## Setup

### Versions

- **Rust: 1.78**
- **Diesel: 2.2.0**
- **Database: Postgres**
- **Operating System: MacOS**

### Feature Flags

- **diesel:** `["postgres", "serde_json", "chrono", "uuid"]`

## Problem Description

### What are you trying to accomplish?

Generating a schema that uses the Geometry SQL types from postgis-diesel. Using the feature `exclude_custom_type_definitions` introduced with https://github.com/diesel-rs/diesel/pull/4002 and documented with https://diesel.rs/guides/configuring-diesel-cli.html#the-exclude_custom_type_definitions-field.

### What is the expected output?

No custom definition and an import of the postgis-diesel type(s).

### What is the actual output?

The custom definition is created and rather than saving output to `src/schema.rs` a new file is created with the name of the value of `exclude_custom_type_definitions`.

### Are you seeing any additional errors?

No additional errors. Patching the documentation or the CLI configuration to align would be great. Diesel CLI saving to a filename other than configured is also worthwhile fixing. 

### Steps to reproduce

Use a `diesel.toml` configured as below. Then run `diesel migration redo`.

```toml
[print_schema]
file = "src/schema.rs"
custom_type_derives = ["diesel::query_builder::QueryId"]
import_types = ["diesel::sql_types::*", "postgis_diesel::sql_types::*"]
exclude_custom_type_definitions = ["Geometry"]
```

To get the desired output `except_custom_type_definitions` has to be used rather than `exclude_custom_type_definitions`. This will properly save output to `src/schema.rs` and will use the postgis-diesel type.

## Checklist

- [x] I have already looked over the [issue tracker](https://github.com/diesel-rs/diesel/issues) and the [discussion forum](https://github.com/diesel-rs/diesel/discussions) for similar possible closed issues.
<!--
If you are unsure if your issue is a duplicate of an existing issue please link the issue in question here
--> 
- [x] This issue can be reproduced on Rust's stable channel. (Your issue will be
  closed if this is not the case)
- [x] This issue can be reproduced without requiring a third party crate



Discussion / hints:
Thanks for pointing out. That seems to be a bit of broken documentation. Mind submitting a PR that fixes the documentation here: https://github.com/sgrif/diesel.rs-website/blob/master/src/guides/configuring-diesel-cli.md?plain=1#L131 ?

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a8183b1e4b0d..bb499cc65939 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,7 +14,7 @@ Increasing the minimal supported Rust version will always be coupled at least wi
 
 ### Added
 
-* Support `[print_schema] exclude_custom_type_definitions = ["Vector"]`. If a `custom type` matches one element on the list it's skipped.
+* Support `[print_schema] except_custom_type_definitions = ["Vector"]`. If a `custom type` matches one element on the list it's skipped.
 * Added automatic usage of all sqlite `rowid` aliases when no explicit primary key is defined for `print-schema`
 * Added a `#[dsl::auto_type]` attribute macro, allowing to infer type of query fragment functions
 * Added the same type inference on `Selectable` derives, which allows skipping specifying `select_expression_type` most of the time, in turn enabling most queries to be written using just a `Selectable` derive.


Test patch: