Skip to content

Commit

Permalink
Add note about modify/3 potentially locking the table (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarkook authored Jun 1, 2022
1 parent c2ea7d0 commit 4d39a6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ecto/migration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,9 @@ defmodule Ecto.Migration do
such as adding or dropping a null constraints, consider using
the `execute/2` command with the relevant SQL command instead
of `modify/3`, if supported by your database. This may avoid
redundant type updates and be more efficient.
redundant type updates and be more efficient, as an unnecessary
type update can lock the table, even if the type actually
doesn't change.
## Examples
Expand Down

0 comments on commit 4d39a6f

Please sign in to comment.