From a0b082b27cc4bb73d87c4756f7f7592c88bb3f90 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Mon, 22 May 2023 08:23:12 +0200 Subject: [PATCH] Prepare a 2.1 release --- CHANGELOG.md | 25 +++++++++++++++++++ diesel/Cargo.toml | 4 +-- diesel/README.md | 10 +------- diesel_cli/Cargo.toml | 6 ++--- diesel_derives/Cargo.toml | 4 +-- diesel_dynamic_schema/Cargo.toml | 4 +-- diesel_migrations/Cargo.toml | 8 +++--- .../migrations_internals/Cargo.toml | 2 +- .../migrations_macros/Cargo.toml | 8 +++--- examples/mysql/all_about_inserts/Cargo.toml | 2 +- .../mysql/getting_started_step_1/Cargo.toml | 2 +- .../mysql/getting_started_step_2/Cargo.toml | 2 +- .../mysql/getting_started_step_3/Cargo.toml | 2 +- .../postgres/advanced-blog-cli/Cargo.toml | 4 +-- .../postgres/all_about_inserts/Cargo.toml | 2 +- .../postgres/all_about_updates/Cargo.toml | 2 +- .../getting_started_step_1/Cargo.toml | 2 +- .../getting_started_step_2/Cargo.toml | 2 +- .../getting_started_step_3/Cargo.toml | 2 +- examples/postgres/relations/Cargo.toml | 2 +- examples/sqlite/all_about_inserts/Cargo.toml | 2 +- .../sqlite/getting_started_step_1/Cargo.toml | 2 +- .../sqlite/getting_started_step_2/Cargo.toml | 2 +- .../sqlite/getting_started_step_3/Cargo.toml | 2 +- 24 files changed, 60 insertions(+), 43 deletions(-) mode change 100644 => 120000 diesel/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 374a7fc631af..7c27a8c79708 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Increasing the minimal supported Rust version will always be coupled at least wi ## Unreleased +## [2.1.0] 2023-05-xx + ### Changed * The minimal officially supported rustc version is now 1.65.0 @@ -26,6 +28,19 @@ Increasing the minimal supported Rust version will always be coupled at least wi * Add support for MySQL's `ON DUPLICATE KEY DO UPDATE` syntax through the existing upsert functions. * Add ability to define multiple columns in a single `distinct_on` for PostgreSQL, like: `.distinct_on((column_a, column_b))`. +* Added column size restrictions to the generated `schema.rs` file + +## [2.0.4] 2023-04-18 + +## Fixed + +* Workaround the missing name resolution in rust-analyzer. This should fix type inference for some diesel queries. (It remains broken for queries containing `.filter()`/`.inner_join()`/`.left_join()`. These require fixes in rust-analyzer itself) +* Fixed a bug that could lead to inserting null values instead of empty values for custom sqlite types +* Fixed a bug that could lead to an unexpected panic while providing an out of bounds bind for `sql_query` in the sqlite backend +* Fixed some mysql backend specific impl being behind the `mysql` instead of the `mysql_backend` feature flag + +## Added + * Support for `libsqlite3-sys` 0.26 ## [diesel_derives 2.0.2] 2023-03-13 @@ -34,6 +49,13 @@ Increasing the minimal supported Rust version will always be coupled at least wi * Fixing the fallout of a breaking change from `quote` by not using their internal API +## [2.0.3] 2023-01-24 + +## Fixed + +* Fixed a bug with our transaction manager implementation that caused by marking transactions as broken which could be recovered. +* Fixed an issue with the combination of `BoxableExpression` and order clauses + ## [2.0.2] 2022-10-11 ### Fixed @@ -2000,3 +2022,6 @@ queries or set `PIPES_AS_CONCAT` manually. [2.0.1]: https://github.com/diesel-rs/diesel/compare/v.2.0.0...v2.0.1 [2.0.2]: https://github.com/diesel-rs/diesel/compare/v.2.0.1...v2.0.2 [diesel_derives 2.0.2]: https://github.com/diesel-rs/diesel/compare/v.2.0.2...diesel_derives_v2.0.2 +[2.0.3]: https://github.com/diesel-rs/diesel/compare/v.2.0.2...v2.0.3 +[2.0.4]: https://github.com/diesel-rs/diesel/compare/v.2.0.3...v2.0.4 +[2.1.0]: https://github.com/diesel-rs/diesel/compare/v.2.0.0...v2.1.0 diff --git a/diesel/Cargo.toml b/diesel/Cargo.toml index 61389bec0810..d2e311f27baa 100644 --- a/diesel/Cargo.toml +++ b/diesel/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "diesel" -version = "2.0.2" +version = "2.1.0" license = "MIT OR Apache-2.0" description = "A safe, extensible ORM and Query Builder for PostgreSQL, SQLite, and MySQL" readme = "README.md" @@ -36,7 +36,7 @@ itoa = { version = "1.0.0", optional = true } time = { version = "0.3.9", optional = true, features = ["macros"] } [dependencies.diesel_derives] -version = "~2.0.0" +version = "~2.1.0" path = "../diesel_derives" [dev-dependencies] diff --git a/diesel/README.md b/diesel/README.md deleted file mode 100644 index 0e150e8d3cb1..000000000000 --- a/diesel/README.md +++ /dev/null @@ -1,9 +0,0 @@ -[![Diesel](https://diesel.rs/assets/images/diesel_logo_stacked_black.png)](https://diesel.rs) - -# Diesel - A safe, extensible ORM and Query Builder for Rust - -Diesel is the most productive way to interact with databases in Rust because of its safe and composable abstractions over queries. - -## Getting Started - -This is the Readme of the main crate. You can find [an extensive Getting Started tutorial](https://diesel.rs/guides/getting-started) and more information on our [website](https://diesel.rs). diff --git a/diesel/README.md b/diesel/README.md new file mode 120000 index 000000000000..32d46ee883b5 --- /dev/null +++ b/diesel/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/diesel_cli/Cargo.toml b/diesel_cli/Cargo.toml index 3ee412341a12..88604370ce3a 100644 --- a/diesel_cli/Cargo.toml +++ b/diesel_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "diesel_cli" -version = "2.0.1" +version = "2.1.0" license = "MIT OR Apache-2.0" description = "Provides the CLI for the Diesel crate" readme = "README.md" @@ -35,12 +35,12 @@ diesel_table_macro_syntax = {version = "0.1", path = "../diesel_table_macro_synt syn = { version = "2", features = ["visit"] } [dependencies.diesel] -version = "~2.0.0" +version = "~2.1.0" path = "../diesel" default-features = false [dependencies.diesel_migrations] -version = "~2.0.0" +version = "~2.1.0" path = "../diesel_migrations/" [dev-dependencies] diff --git a/diesel_derives/Cargo.toml b/diesel_derives/Cargo.toml index 9a5dcaafa82c..3a7b573da586 100644 --- a/diesel_derives/Cargo.toml +++ b/diesel_derives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "diesel_derives" -version = "2.0.2" +version = "2.1.0" license = "MIT OR Apache-2.0" description = "You should not use this crate directly, it is internal to Diesel." documentation = "https://diesel.rs/guides/" @@ -22,7 +22,7 @@ cfg-if = "1" dotenvy = "0.15" [dev-dependencies.diesel] -version = "~2.0.0" +version = "~2.1.0" path = "../diesel" [lib] diff --git a/diesel_dynamic_schema/Cargo.toml b/diesel_dynamic_schema/Cargo.toml index 306c3251c284..e34ac8043b27 100644 --- a/diesel_dynamic_schema/Cargo.toml +++ b/diesel_dynamic_schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "diesel-dynamic-schema" -version = "0.2.0" +version = "0.2.1" license = "MIT OR Apache-2.0" edition = "2018" autotests = false @@ -14,7 +14,7 @@ include = ["src/**/*", "LICENSE-*", "README.md"] rust-version = "1.65.0" [dependencies.diesel] -version = "~2.0.0" +version = "~2.1.0" path = "../diesel/" default-features = false diff --git a/diesel_migrations/Cargo.toml b/diesel_migrations/Cargo.toml index 2893a2789e49..d9d665c89dab 100644 --- a/diesel_migrations/Cargo.toml +++ b/diesel_migrations/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "diesel_migrations" -version = "2.0.0" +version = "2.1.0" license = "MIT OR Apache-2.0" description = "Migration management for diesel" documentation = "https://docs.rs/crate/diesel_migrations" @@ -9,11 +9,11 @@ edition = "2021" rust-version = "1.65.0" [dependencies.migrations_internals] -version = "~2.0.0" +version = "~2.1.0" path = "migrations_internals" [dependencies.migrations_macros] -version = "~2.0.0" +version = "~2.1.0" path = "migrations_macros" [dev-dependencies] @@ -22,7 +22,7 @@ cfg-if = "1.0.0" tempfile = "3.2" [dependencies.diesel] -version = "~2.0.0" +version = "~2.1.0" path = "../diesel" default-features = false diff --git a/diesel_migrations/migrations_internals/Cargo.toml b/diesel_migrations/migrations_internals/Cargo.toml index f36ff1aab1d6..092fc73e6c72 100644 --- a/diesel_migrations/migrations_internals/Cargo.toml +++ b/diesel_migrations/migrations_internals/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "migrations_internals" -version = "2.0.0" +version = "2.1.0" license = "MIT OR Apache-2.0" description = "Internal implementation of diesels migration mechanism" homepage = "https://diesel.rs" diff --git a/diesel_migrations/migrations_macros/Cargo.toml b/diesel_migrations/migrations_macros/Cargo.toml index 7ff67f06d9fc..cdcc6f23d7e1 100644 --- a/diesel_migrations/migrations_macros/Cargo.toml +++ b/diesel_migrations/migrations_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "migrations_macros" -version = "2.0.0" +version = "2.1.0" license = "MIT OR Apache-2.0" description = "Codegeneration macros for diesels embedded migrations" homepage = "https://diesel.rs" @@ -12,7 +12,7 @@ quote = "1" proc-macro2 = "1" [dependencies.migrations_internals] -version = "~2.0.0" +version = "~2.1.0" path = "../migrations_internals" [dev-dependencies] @@ -21,12 +21,12 @@ dotenvy = "0.15" cfg-if = "1.0.0" [dev-dependencies.diesel] -version = "~2.0.0" +version = "~2.1.0" path = "../../diesel" default-features = false [dev-dependencies.diesel_migrations] -version = "~2.0.0" +version = "~2.1.0" path = "../" default-features = false diff --git a/examples/mysql/all_about_inserts/Cargo.toml b/examples/mysql/all_about_inserts/Cargo.toml index 94f2b121b06d..e9328653c2df 100644 --- a/examples/mysql/all_about_inserts/Cargo.toml +++ b/examples/mysql/all_about_inserts/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["mysql", "chrono"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["mysql", "chrono"] } serde = { version = "1.0.130", features = ["derive"] } serde_json = "1.0.68" chrono = { version = "0.4.20", default-features = false, features = ["clock", "std"] } diff --git a/examples/mysql/getting_started_step_1/Cargo.toml b/examples/mysql/getting_started_step_1/Cargo.toml index 0406b4b826c2..10909ef3bca8 100644 --- a/examples/mysql/getting_started_step_1/Cargo.toml +++ b/examples/mysql/getting_started_step_1/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["mysql"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["mysql"] } dotenvy = "0.15" [[bin]] diff --git a/examples/mysql/getting_started_step_2/Cargo.toml b/examples/mysql/getting_started_step_2/Cargo.toml index ff16faed89d9..00dd2675f1c4 100644 --- a/examples/mysql/getting_started_step_2/Cargo.toml +++ b/examples/mysql/getting_started_step_2/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["mysql"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["mysql"] } dotenvy = "0.15" [[bin]] diff --git a/examples/mysql/getting_started_step_3/Cargo.toml b/examples/mysql/getting_started_step_3/Cargo.toml index d3cdaf571b82..7541a874b36d 100644 --- a/examples/mysql/getting_started_step_3/Cargo.toml +++ b/examples/mysql/getting_started_step_3/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["mysql"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["mysql"] } dotenvy = "0.15" [[bin]] diff --git a/examples/postgres/advanced-blog-cli/Cargo.toml b/examples/postgres/advanced-blog-cli/Cargo.toml index d7a58919d445..db5cbdd82f73 100644 --- a/examples/postgres/advanced-blog-cli/Cargo.toml +++ b/examples/postgres/advanced-blog-cli/Cargo.toml @@ -7,14 +7,14 @@ publish = false [dependencies] argon2 = "0.5.0" chrono = { version = "0.4.20", default-features = false, features = ["clock", "std"] } -diesel = { version = "2.0.0", path = "../../../diesel", features = ["postgres", "chrono"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["postgres", "chrono"] } dotenvy = "0.15" clap = { version = "4.2.7", features = ["derive"] } tempfile = "3.1.0" [dev-dependencies] assert_matches = "1.1" -diesel_migrations = { version = "2.0.0", features = ["postgres"], path = "../../../diesel_migrations" } +diesel_migrations = { version = "2.1.0", features = ["postgres"], path = "../../../diesel_migrations" } lazy_static = "1.0" [[bin]] diff --git a/examples/postgres/all_about_inserts/Cargo.toml b/examples/postgres/all_about_inserts/Cargo.toml index fe36622e1186..ac5c7b42bcff 100644 --- a/examples/postgres/all_about_inserts/Cargo.toml +++ b/examples/postgres/all_about_inserts/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["postgres"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["postgres"] } serde = { version = "1.0.130", features = ["derive"] } serde_json = "1.0.68" diff --git a/examples/postgres/all_about_updates/Cargo.toml b/examples/postgres/all_about_updates/Cargo.toml index 01107ae7aec0..89952a8f6873 100644 --- a/examples/postgres/all_about_updates/Cargo.toml +++ b/examples/postgres/all_about_updates/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["postgres"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["postgres"] } [lib] doc = false diff --git a/examples/postgres/getting_started_step_1/Cargo.toml b/examples/postgres/getting_started_step_1/Cargo.toml index 582eba5bbc80..ee57cfd7ddf4 100644 --- a/examples/postgres/getting_started_step_1/Cargo.toml +++ b/examples/postgres/getting_started_step_1/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["postgres"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["postgres"] } dotenvy = "0.15" [[bin]] diff --git a/examples/postgres/getting_started_step_2/Cargo.toml b/examples/postgres/getting_started_step_2/Cargo.toml index bfb0561bfc21..9d0ded076927 100644 --- a/examples/postgres/getting_started_step_2/Cargo.toml +++ b/examples/postgres/getting_started_step_2/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["postgres"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["postgres"] } dotenvy = "0.15" [[bin]] diff --git a/examples/postgres/getting_started_step_3/Cargo.toml b/examples/postgres/getting_started_step_3/Cargo.toml index 4c03c1594bcb..d751a37fb8bf 100644 --- a/examples/postgres/getting_started_step_3/Cargo.toml +++ b/examples/postgres/getting_started_step_3/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["postgres"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["postgres"] } dotenvy = "0.15" [[bin]] diff --git a/examples/postgres/relations/Cargo.toml b/examples/postgres/relations/Cargo.toml index 5692b708144b..1a5ee5f1e867 100644 --- a/examples/postgres/relations/Cargo.toml +++ b/examples/postgres/relations/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -diesel = { version = "2.0.2", features = ["postgres"], path = "../../../diesel" } +diesel = { version = "2.1.0", features = ["postgres"], path = "../../../diesel" } dotenvy = "0.15.6" diff --git a/examples/sqlite/all_about_inserts/Cargo.toml b/examples/sqlite/all_about_inserts/Cargo.toml index fa687033a9ba..28e23b0eb31b 100644 --- a/examples/sqlite/all_about_inserts/Cargo.toml +++ b/examples/sqlite/all_about_inserts/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["sqlite", "chrono"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "chrono"] } serde = { version = "1.0.130", features = ["derive"] } serde_json = "1.0.68" chrono = { version = "0.4.20", default-features = false, features = ["clock", "std"] } diff --git a/examples/sqlite/getting_started_step_1/Cargo.toml b/examples/sqlite/getting_started_step_1/Cargo.toml index 645a763a7a27..a840e2215eba 100644 --- a/examples/sqlite/getting_started_step_1/Cargo.toml +++ b/examples/sqlite/getting_started_step_1/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["sqlite"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite"] } dotenvy = "0.15" [[bin]] diff --git a/examples/sqlite/getting_started_step_2/Cargo.toml b/examples/sqlite/getting_started_step_2/Cargo.toml index b0cf14bb401b..b5e25220a823 100644 --- a/examples/sqlite/getting_started_step_2/Cargo.toml +++ b/examples/sqlite/getting_started_step_2/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] } dotenvy = "0.15" [[bin]] diff --git a/examples/sqlite/getting_started_step_3/Cargo.toml b/examples/sqlite/getting_started_step_3/Cargo.toml index b04c1f1a2253..3da78bf8c875 100644 --- a/examples/sqlite/getting_started_step_3/Cargo.toml +++ b/examples/sqlite/getting_started_step_3/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" publish = false [dependencies] -diesel = { version = "2.0.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] } +diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] } dotenvy = "0.15" [[bin]]