All Versions
54
Latest Version
Avg Release Cycle
60 days
Latest Release
34 days ago

Changelog History
Page 1

  • v1.4.3

    October 11, 2019

    🛠 Fixed

    • ⚡️ Updated several dependencies
    • 🛠 Fixed an issue where the postgresql backend exploits implementation defined behaviour
    • 🛠 Fixed issue where rustdoc failed to build the documentation
    • diesel_derives and diesel_migrations are updated to syn 1.0
  • v1.4.2

    March 19, 2019

    🛠 Fixed

    • Parenthesis are now inserted around all mathematical operations. This means that (2.into_sql() + 3) * 4 will correctly evaluate to 20 as expected. Previously we would generate SQL that evaluated to 14. This could even result in runtime errors if multiple types were involved (for example, interval * (integer + 1))
  • v1.4.1

    January 24, 2019

    🛠 Fixed

    • 🚀 This release fixes a minor memory safety issue in SQLite. This bug would only occur in an error handling branch that should never occur in practice.

    ➕ Added

    • ➕ Added BoxedSqlQuery. This allows users to do a variable amount of .sql or .bind calls without changing the underlying type.
    • ➕ Added .sql to SqlQuery and UncheckedBind to allow appending SQL code to an existing query.
  • v1.4.0

    January 21, 2019

    🛠 Fixed

    • embed_migrations! will no longer emit an unused import warning
    • 👍 Diesel now supports uuid 0.7 by adding the new feature flag uuidv07

    ➕ Added

    • 🔧 Diesel CLI can be configured to error if a command would result in changes to your schema file by passing --locked-schema. This is intended for use in CI and production deploys, to ensure that the committed schema file is up to date.

    • A helper trait has been added for implementing ToSql for PG composite types. See [WriteTuple][write-tuple-1-4-0] for details.

    📄 [write-tuple-1-4-0]: docs.diesel.rs/diesel/serialize/trait.WriteTuple.html

    • ➕ Added support for MySQL's UNSIGNED TINYINT

    • 👀 DatabaseErrorKind::SerializationFailure has been added, corresponding to SQLSTATE code 40001 (A SERIALIZABLE isolation level transaction failed to commit due to a read/write dependency on another transaction). This error is currently only detected on PostgreSQL.

    • 👀 Diesel CLI can now generate completions for zsh and fish. See diesel completions --help for details.

    • #[belongs_to] can now accept types that are generic over lifetimes (for example, if one of the fields has the type Cow<'a, str>). To define an association to such a type, write #[belongs_to(parent = "User<'_>")]

    • 👍 Nullable<Text> now supports ilike expression on in PostgreSQL.

    • diesel_manage_updated_at('table_name') is now available on SQLite. This function can be called in your migrations to create a trigger which automatically sets the updated_at column, unless that column was updated in the query.

    🔄 Changed

    • Diesel's derives now require that extern crate diesel; be at your crate root (e.g. src/lib.rs or src/main.rs)

    • Tinyint has been renamed to TinyInt and an alias has been created from Tinyint to TinyInt.

    • 👍 The minimal officially supported rustc version is now 1.31.0

  • v1.3.3

    September 12, 2018

    🛠 This is a small bugfix release, addressing an issue with MySQL 8.0. The
    behavior of the C API in libmysqlclient changed in this version of
    MySQL, causing problems when a connection pool was used with Diesel.

    If you are not using MySQL, or are on a version older than 8.0, this
    🚀 release does not affect you.

  • v1.3.2

    June 14, 2018

    This release contains two major bugfixes. This release fixes the behavior of unsigned types on MySQL, and a compile time issue caused by the use of #[sql_name] in sql_function! with no return type. This release only affects users who are using unsigned types on MySQL, or who had code which failed to compile with 1.3.1.

  • v1.3.1

    January 21, 2019

    🛠 Fixed

    • 🛠 Fixed an issue with Diesel CLI's use of temp files that caused errors on Windows.
  • v1.3.0

    May 22, 2018

    🆕 New Features

    🖨 This release includes a couple of major changes to how Diesel projects are developed. In the past, we've had 2 ways to generate schema.rs. A procedural macro called infer_schema!, and a CLI command diesel print-schema. We've recommended using the CLI command for a long time, but infer_schema! was still useful for early prototypes.

    At the beginning of a project, your database schema changes much more frequently. It's extremely annoying to have to remember to run a second command after running your migrations.

    🔧 Diesel CLI 1.3 now supports a configuration file to customize its behavior. One of the new capabilities this provides is the ability to automatically regenerate schema.rs whenever you run or revert a migration. This means you no longer have to remember to run diesel print-schema when things change.

    Because of this, we are deprecating diesel_infer_schema. 1.3 will be the final release of that crate. However, diesel_infer_schema 1.3 will continue to work with diesel until at least Diesel 2.0. You can see all of the capabilities of the new configuration file at http://diesel.rs/guides/configuring-diesel-cli.

    📄 This release also includes a complete redesign of the sql_function! macro. The new syntax is significantly closer to normal Rust. For example, what used to be written as:

    sql\_function! { lower, lower\_t, (x: Text) -\> Text, "Here are the docs for `lower`It's awkward to make multiline"}
    

    Can now be written as:

    sql\_function! { /// Here are the docs for `lower`/// It's just a normal doc comment.fn lower(x: Text) -\> Text; }
    

    👍 The new form also supports much more than the old one, including aggregate functions, function renaming, and generic functions. Things like MAX could previously not be expressed with sql_function!. However, now the definition looks like this:

    sql\_function! { #[aggregate] fn max\<ST: SqlOrd + IntoNullable\>(expr: ST) -\> ST::Nullable; }
    

    👍 Finally, the redesigned sql_function! supports user defined functions on SQLite. SQLite differs from other databases, in that custom functions aren't defined in SQL. Instead you give it a C function pointer to use for the body. With Diesel, you can just give us any Rust closure that takes appropriate argument types, and we'll handle gluing that to SQLite for you.

    📄 You can find examples for all of this in the docs for sql_function!.

    🚀 In addition to the headline features, this release includes a ton of quality of life changes including expanded support for locking clauses, more global support for mathematic operators, and more. As always, for a full list of changes you can find it in [the changelog].

    Thanks

    🚀 Thank you to everyone who helped make this release happen through bug reports, and discussion on Gitter. While we don't have a way to collect stats on that form of contribution, it's greatly appreciated.

    🚀 In addition to the Diesel core team, 12 people contributed code to this release. A huge thank you to:

    • Aleksey Ivanov
    • Christopher Brickley
    • David Reid
    • Diggory Blake
    • Graham Turner
    • Katharina
    • Matt Kraai
    • Nick Babcock
    • Richard Petrie
    • Simon Dickson
    • Sunrin SHIMURA
    • Thierry Berger
  • v1.2.2

    April 12, 2018

    🔄 Changed

    • ⚠ Warnings are now allowed inside the crate. The way we had attempted to deprecate old feature names caused builds to break. We are still not happy with how this deprecation gets communicated, and will revisit it in the future.
  • v1.2.1

    April 11, 2018

    🔄 Changed

    • 📇 Renamed x32-column-tables, x64-column-tables, and x128-column-tables to 32-column-tables, 64-column-tables, and 128-column-tables. The leading x was due to a bug in crates.io discovered while publishing 1.2.0. The bug has since been fixed.