Enhancements
- Add MySQL support
- Log when migration is already up/down
- Add
Ecto.Association.loaded?/1
- Support joins besides where clauses in
update_all
anddelete_all
- Support optimistic locking with
Ecto.Model.OptimisticLock
- Allow timeout when querying the database to be configured via
:timeout
- Allow timeout when connecting to the database to be configured via
:connect_timeout
- Support maps in select in queries
- Allow custom macros to be used in queries
- Support
distinct: true
that simply sets SELECT DISTINCT
Backwards incompatible changes
- Primary keys are no longer automatically marked with
read_after_writes
. If you have a custom primary key that is AUTO INCREMENT/SERIAL in the database, you will have to passread_after_writes: true
as option when setting@primary_key
- Remove blank checks from
Ecto.Changeset.cast/4
(you should automatically set the parameters values to nil before callingcast/4
. If you are using Phoenix, Phoenix master has aplug :scrub_params, "user"
for that) Ecto.Changeset.cast/4
now expects the changeset/model as first argument and the parameters as secondEcto.Query.distinct/3
can now be specified on queries just onceEcto.Associations
renamed toEcto.Association
(unlikely to affect user code)
Deprecations
- The
:adapter
option should now be specified in the config file rather than when usingEcto.Repo
(you will receive a warning if you don't)
Adapter API changes
:time
types now use a tuple of four elements (hour, min, sec and msec)Ecto.Adapter.update/6
now expects the fields as third argument and filters as fourthEcto.Migration.Reference
now have a default type of:serial
that needs to be translated to the underlying primary key representationEcto.Query
now has adistinct
field (instead ofdistincts
) and its expression may true, false or a list