Closed
Description
I had a resource with a start_date with an index but I renamed it to date and while generating the migration it switched the order around by first adding an index before renaming the column which will result in a crash.
def up do
drop_if_exists index(:events, [:start_date])
create index(:events, [:date])
rename table(:events), :start_date, to: :date
alter table(:events) do
modify :date, :date
end
end