Skip to content

Commit 7d5cc0f

Browse files
authored
Update migration.ex
1 parent 6e9d871 commit 7d5cc0f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/ecto/migration.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -742,10 +742,8 @@ defmodule Ecto.Migration do
742742
743743
"""
744744
def drop_if_exists(%{} = index_or_table_or_constraint, opts \\ []) when is_list(opts) do
745-
Runner.execute(
746-
{:drop_if_exists, __prefix__(index_or_table_or_constraint), Keyword.get(opts, :mode, :restrict)}
747-
)
748-
745+
mode = Keyword.get(opts, :mode, :restrict)
746+
Runner.execute({:drop_if_exists, __prefix__(index_or_table_or_constraint), mode})
749747
index_or_table_or_constraint
750748
end
751749

0 commit comments

Comments
 (0)