diesel v1.4.0 Release Notes

Release Date: 2019-01-21 // about 5 years ago
  • ๐Ÿ›  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