diesel v0.8.0 Release Notes
Release Date: 2016-10-10 // over 7 years ago-
➕ Added
➕ Added partial support for composite primary keys.
➕ Added support for PostgreSQL
NULLS FIRST
andNULLS LAST
when sorting. See https://docs.diesel.rs/diesel/prelude/trait.SortExpressionMethods.html for details.➕ Added support for the
timestamp with time zone
type in PostgreSQL (referred to asdiesel::types::Timestamptz
)👀 Diesel CLI can now generate bash completion. See the readme for details.
infer_schema!
andinfer_table_from_schema!
can now take"env:foo"
instead ofenv!("foo")
and"dotenv:foo"
instead ofdotenv!("foo")
. The use ofdotenv
requires thedotenv
feature ondiesel_codegen
, which is included by default. Usingenv!
anddotenv!
will no longer work withdiesel_codegen
. They continue to work withdiesel_codegen_syntex
, but that crate will be deprecated when Macros 1.1 is in the beta channel for Rust.
🔄 Changed
Structs annotated with
#[has_many]
or#[belongs_to]
now require#[derive(Associations)]
. This is to allow them to work with Macros 1.1.embed_migrations!
now resolves paths relative toCargo.toml
instead of the file the macro was called from. This change is required to allow this macro to work with Macros 1.1.
🛠 Fixed
diesel migrations run
will now respect migration directories overridden by command line argument or environment variable- The
infer_schema!
macro will no longer fetch views alongside with tables. This was a source of trouble for people that had created views or are using any extension that automatically creates views (e.g. PostGIS)
🔄 Changed
#[changeset_for(foo)]
should now be written as#[derive(AsChangeset)] #[table_name="foo"]
. If you were specifyingtreat_none_as_null = "true"
, you should additionally have#[changeset_options(treat_none_as_null = "true")]
.#[insertable_into(foo)]
should now be written as#[derive(Insertable)] #[table_name="foo"]
.