Skip to content

Commit

Permalink
Adapt index name, drop old index before creating the unique one
Browse files Browse the repository at this point in the history
  • Loading branch information
kathap committed Aug 25, 2022
1 parent 49f61ae commit 5f38188
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
self[:service_instance_operations].where(id: row[:id]).delete
end
alter_table :service_instance_operations do
add_index :service_instance_id, name: :service_instance_operations_service_instance_id_unique_index, unique: true
drop_index :service_instance_id, name: :svc_instance_id_index, if_exists: true
add_index :service_instance_id, name: :svc_inst_op_svc_instance_id_unique_index, unique: true
end
end
down do
alter_table :service_instance_operations do
drop_index :service_instance_id
add_index :service_instance_id, name: :svc_instance_id_index
end
end
end

0 comments on commit 5f38188

Please sign in to comment.