I am trying to remove the uniqueness off a postgresql column index in my rails 4.1 app.
The original migration included:
add_index :customer_action_plan_objectives, :customer_action_plan_id,:unique => true, :name => "plan_id"
I have tried
class ChangeIndexUniquenessCustomerActionPlanObjectives < ActiveRecord::Migration
def change
remove_index :customer_action_plan_objectives, :customer_action_plan_id
add_index :customer_action_plan_objectives, :customer_action_plan_id, :name => "plan_id"
end
end
But I am getting an error:
Index name 'index_customer_action_plan_objectives_on_customer_action_plan_id' on table 'customer_action_plan_objectives' does not exist
Is this an issue caused by ":name => "plan_id"" or something else? My current solution has been sourced form this question and answer.