Ecto creating unique index failed for Mysql/Mariadb
问题 I try to do the following migration: defmodule Shopper.Repo.Migrations.MakeNameUniqueShopper do use Ecto.Migration def change do create unique_index :shoppers, [:name] end end Also tried create unique_index :shoppers, [:name], name: :name_unique , create unique_index :shoppers, [:name], name: "name_unique" , and create index(:shoppers, [:name], unique: true) But they failed with similar error: [info] == Running Shopper.Repo.Migrations.MakeNameUniqueShopper.change/0 forward [info] create index