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 0c5581d commit a20f2d3Copy full SHA for a20f2d3
lib/ecto/migration.ex
@@ -920,6 +920,11 @@ defmodule Ecto.Migration do
920
# Create a tsvector GIN index on PostgreSQL
921
create index("products", ["(to_tsvector('english', name))"],
922
name: :products_name_vector, using: "GIN")
923
+
924
+ If the expression is a column name, it will not be quoted. This may cause issues
925
+ when the column is named after a reserved word. Consider using an atom instead.
926
+ For example, the name `offset` is reserved in many databases so the following
927
+ could produce an error: `create index("products", ["offset"])`.
928
"""
929
def index(table, columns, opts \\ [])
930
0 commit comments