ecto breaking changes
Updated December 4, 2026
On this page
Latest version 3.15.0, released November 30, 2026. Apache-2.0 license. Source repository
- From 2.0.0 to 3.0.0: 18 breaking changes in 1 version.
- From 0.2.0 to 3.0.0: 114 breaking changes in 16 versions.
ecto 3.0.0 breaking changes
- Removed
Ecto.DataType
The Ecto.DataType protocol has been removed. github.com - Removed
Ecto.Date
Ecto.Date was deprecated earlier and is now removed. github.com - Removed
Ecto.DateTime
Ecto.DateTime was deprecated earlier and is now removed. github.com - Removed
Ecto.Time
Ecto.Time was deprecated earlier and is now removed. github.com - Renamed
Ecto.Adapter
Ecto.Adapter is split into Ecto.Adapter.Queryable and Ecto.Adapter.Schema. Adapter authors must update their code. github.com - Behavior changed
Queries comparing a string with a charlist now raise during planning instead of passing silently. github.com - Behavior changed
:naive_datetime
Use :naive_datetime_usec if microseconds must be kept. github.com - Behavior changed
:sources
Each entry in :sources is now {source, schema, prefix}. Adapters reading this field must update. github.com - Behavior changed
:time
Use :time_usec if microseconds must be kept. github.com - Behavior changed
:utc_datetime
Use :utc_datetime_usec if microseconds must be kept. github.com - Behavior changed
@schema_prefix
The schema prefix now affects only from and join expressions where the schema is used, not the whole query. github.com - Behavior changed
Ecto.Multi.run.5
Callbacks now receive the repo as the first argument and the changes so far as the second. github.com - Behavior changed
execute_ddl
Adapters should return {:ok, []} from execute_ddl. Adapters not built on Ecto.Adapters.SQL must change. github.com - Behavior changed
from
The from field in Ecto.Query is now a Ecto.Query.FromExpr with a :source field, matching join expressions. github.com - Behavior changed
insert
Adapters now receive :source and :prefix as separate fields instead of one combined :source field. github.com - Behavior changed
join
Fragments in joins are not wrapped in parentheses anymore. Wrap them explicitly where needed, such as in common table expressions. github.com - Behavior changed
on_conflict
Adapters now receive a list of field atoms instead of the {:replace_all, list(), atom()} tuple. github.com - Default changed
:migration_lock
Migrations now lock the migrations table; the default is FOR UPDATE, and set to nil to disable the lock. github.com
ecto 2.0.0 breaking changes
- Removed
changeset.optional
changeset.optional no longer exists and has no direct replacement in the notes. github.com - Removed
Ecto.Adapters.SQL.begin_test_transaction
Use the ownership-based Ecto.Adapters.SQL.Sandbox instead. github.com - Removed
Ecto.Adapters.SQL.restart_test_transaction
Use the ownership-based Ecto.Adapters.SQL.Sandbox instead. github.com - Removed
Ecto.Adapters.SQL.rollback_test_transaction
Use the ownership-based Ecto.Adapters.SQL.Sandbox instead. github.com - Removed
Ecto.Pools.Poolboy
Use DBConnection.Poolboy instead. github.com - Removed
Ecto.Pools.SojournBroker
Use DBConnection.Sojourn instead. github.com - Removed
Repo.log
Provide custom loggers through the :loggers configuration instead of overriding Repo.log/1. github.com - Renamed
changeset.model
Use changeset.data in place of changeset.model. github.com - Renamed
Ecto.StaleModelError
Use Ecto.StaleEntryError in place of Ecto.StaleModelError. github.com - Behavior changed
__schema__
__schema__(:types) now returns a map instead of the previous return type. github.com
And 8 more in this version. Sign up to see every change
ecto 0.16.0 breaking changes
- Behavior changed
Ecto.Adapters.SQL.query.4
Ecto.Adapters.SQL.query/4 now returns {:ok, result}; use Ecto.Adapters.SQL.query!/4 to keep the previous behaviour. github.com - Signature changed
Ecto.Adapter.insert.update.delete
Ecto.Adapter insert, update and delete callbacks receive context, and schema load expects context; custom adapters must be updated. github.com
ecto 0.15.0 breaking changes
- Removed
exists?.1
The exists?/1 helper in migrations has been removed. Use create_if_not_exists and drop_if_exists instead. github.com - Renamed
Ecto.MissingPrimaryKeyError
Ecto.MissingPrimaryKeyError was renamed to Ecto.NoPrimaryKeyValueError. Update code that matches on the old name. github.com - Renamed
Ecto.NoPrimaryKeyError
Ecto.NoPrimaryKeyError was renamed to Ecto.NoPrimaryKeyFieldError. Update code that matches on the old name. github.com - Signature changed
rename
Calling rename on tables in migrations now requires the to: keyword form. Update existing rename calls to use it. github.com
ecto 0.14.0 breaking changes
- Removed
:date
The :date type is gone; use Ecto.Date instead. github.com - Removed
:datetime
The :datetime type is gone; use Ecto.DateTime instead. github.com - Removed
:time
The :time type is gone; use Ecto.Time instead. github.com - Removed
id_types.0
id_types/0 was removed from adapters; use load/2 and dump/2 instead. github.com - Behavior changed
SQL adapters must now return each row as a list instead of a tuple. Custom adapters must change their row format. github.com - Behavior changed
Ecto.Adapters.SQL.query
Ecto.Adapters.SQL.query/4 now returns rows as a list of lists instead of a list of tuples. Update code that pattern-matches on tuples. github.com - Behavior changed
Ecto.Changeset.errors
Changeset errors return the count as a keyword option, for example {"...%{count}", count: 3}, instead of a bare integer. Update code that matches on these tuples. github.com - Behavior changed
Ecto.Repo.transaction
Multiple transaction calls no longer use savepoints; a failure in any block rolls back the outermost transaction, even if rescued. Code relying on savepoints must change. github.com - Behavior changed
Ecto.Repo.update!
Ecto.Repo.update!/2 no longer runs callbacks or writes to the database when there are no changes. Pass :force to run callbacks anyway. github.com - Signature changed
Ecto.Adapter.delete
Ecto.Adapter.delete now receives {source, model} instead of the previous argument. Custom adapters must update their callbacks. github.com
And 2 more in this version. Sign up to see every change
ecto 0.13.0 breaking changes
- Behavior changed
Ecto.Repo.delete_all
Code that expects a plain count from delete_all must now match the {counter, nil} tuple instead. github.com - Behavior changed
Ecto.Repo.update_all
Code that expects a plain count from update_all must now match the {counter, nil} tuple instead. github.com - Configuration changed
Ecto.Adapters.SQL
Transactional tests must set pool: Ecto.Adapters.SQL.Sandbox in the repository configuration of the test environment. github.com - Signature changed
Ecto.Repo.update_all
Replace bare keyword updates such as Repo.update_all queryable, foo: "bar" with set: or inc: keyword options. github.com
Older versions
11 older versions, each with its first changes. Sign up to see every change
Show 11 older versions
ecto 0.12.0 breaking changes
- Removed
:uuid
The :uuid type has been removed. Use Ecto.UUID instead. github.com - Renamed
:auto_field
The :auto_field option of belongs_to/3 is now :define_field. Update existing uses. github.com
And 4 more in this version.
ecto 0.11.0 breaking changes
- Removed
Ecto.Changeset.apply.1
Ecto.Changeset.apply/1 was removed. Use Ecto.Changeset.apply_changes/1 instead. github.com - Behavior changed
Ecto.Changeset
Changesets now track dirty changes, so values equal to the value already in the model are no longer sent to the Repo on insert or update. github.com
And 2 more in this version.
ecto 0.10.0 breaking changes
- Removed
__state__
The __state__ field was removed. Use the __meta__ field, which holds the state and the model source. github.com - Removed
@timestamps_type
The @timestamps_type attribute was removed. Use @timestamps_opts with the type option instead. github.com
And 6 more in this version.
ecto 0.9.0 breaking changes
- Renamed
Ecto.Associations
The Ecto.Associations module was renamed to Ecto.Association. github.com - Renamed
Ecto.Query.distincts
The Ecto.Query distincts field is now named distinct, and its expression may be true, false or a list. github.com
And 7 more in this version.
ecto 0.8.0 breaking changes
- Removed
<<>>
The <<>> syntax in queries has been removed; pass values as explicit parameters instead. github.com - Removed
uuid
The uuid() syntax in queries has been removed; pass values as explicit parameters instead. github.com
And 2 more in this version.
ecto 0.7.0 breaking changes
- Renamed
Ecto.Adapters.Postgres.begin_test_transaction.2
Ecto.Adapters.Postgres.begin_test_transaction/2 has been renamed to Ecto.Adapters.SQL.begin_test_transaction/2. github.com - Renamed
Ecto.Adapters.Postgres.query.4
Ecto.Adapters.Postgres.query/4 has been renamed to Ecto.Adapters.SQL.query/4. Update calls to use the new name. github.com
And 3 more in this version.
ecto 0.6.0 breaking changes
- Removed
Migrations written in the previous style stop working. Replace the raw SQL commands with execute/1 calls. github.com - Removed
Validations that were already deprecated have been removed, so code relying on them will no longer work. github.com
And 1 more in this version.
ecto 0.5.0 breaking changes
- Removed
@schema_defaults
Set @primary_key and @foreign_key_type directly instead of @schema_defaults. github.com - Removed
Ecto.Schema.schema.2
Options to schema/2 were removed. Set @primary_key and @foreign_key_type before the schema/2 call. github.com
And 6 more in this version.
ecto 0.4.0 breaking changes
- Removed
Ecto.Associations.Preloader.preload.3
Ecto.Associations.Preloader.preload/3 was removed. Use Repo.preload/2 instead. github.com - Removed
p.comments
The join: p.comments form is gone. Use join: assoc(p, :comments) instead. github.com
And 2 more in this version.
ecto 0.3.0 breaking changes
- Removed
:virtual
The :virtual type no longer exists. Pass virtual: true as a field option instead. github.com - Removed
array
The array(array, type) helper was removed because type inference no longer needs it for interpolated values. github.com
And 3 more in this version.
ecto 0.2.0 breaking changes
- Removed
Ecto.Entity
Ecto.Entity is gone. Define models with schema/2, which defines a struct in the current module. github.com - Removed
queryable.2
The queryable/2 macro is gone. Use schema/2 in models instead. github.com
And 4 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.