Add delete on cascade to fk_svc_inst_op_svc_instance_id
We can see double entries for the same service_instance_id in the service_instance_operations table. This leads to: PG::ForeignKeyViolation: ERROR: update or delete on table "service_instances" violates foreign key constraint "fk_svc_inst_op_svc_instance_id" on table "service_instance_operations"
For service bindings, service keys and route bindings the foreign key constraint from operation to resource contains ON DELETE CASCADE; for service instances this is missing.
Adding ON DELETE CASCADE to FK fk_svc_inst_op_svc_instance_id in service_instance_operations
Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:
-
A short explanation of the proposed change:
-
An explanation of the use cases your change solves
-
Links to any other associated PRs
-
[X] I have reviewed the contributing guide
-
[X] I have viewed, signed, and submitted the Contributor License Agreement
-
[X] I have made this pull request to the
mainbranch -
[X] I have run all the unit tests using
bundle exec rake -
[ ] I have run CF Acceptance Tests