Skip to content

Commit

Permalink
Clarify that index names can be a string or an atom (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
PragTob authored Oct 22, 2024
1 parent 6e7a49e commit e57c91a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ecto/migration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ defmodule Ecto.Migration do
@type t :: %__MODULE__{
table: String.t(),
prefix: String.t() | nil,
name: atom,
name: String.t() | atom,
columns: [atom | String.t()],
unique: boolean,
concurrently: boolean,
Expand Down Expand Up @@ -779,7 +779,8 @@ defmodule Ecto.Migration do
## Options
* `:name` - the name of the index. Defaults to "#{table}_#{column}_index".
* `:name` - the name of the index. Can be provided as a string or an atom.
Defaults to "#{table}_#{column}_index".
* `:prefix` - specify an optional prefix for the index.
* `:unique` - indicates whether the index should be unique. Defaults to `false`.
* `:comment` - adds a comment to the index.
Expand Down

0 comments on commit e57c91a

Please sign in to comment.