We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13940d4 commit 76f81b7Copy full SHA for 76f81b7
lib/ecto/adapters/sqlite3/connection.ex
@@ -113,11 +113,14 @@ defmodule Ecto.Adapters.SQLite3.Connection do
113
constraint
114
|> String.split(", ")
115
|> Enum.with_index()
116
- |> Enum.map(fn {table_col, idx} ->
117
- case idx do
118
- 0 -> table_col |> String.replace(".", "_")
119
- _ -> table_col |> String.split(".") |> List.last()
120
- end
+ |> Enum.map(fn
+ {table_col, 0} ->
+ String.replace(table_col, ".", "_")
+
+ {table_col, _} ->
121
+ table_col
122
+ |> String.split(".")
123
+ |> List.last()
124
end)
125
|> Enum.concat(["index"])
126
|> Enum.join("_")
0 commit comments