You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: