cloud_controller_ng icon indicating copy to clipboard operation
cloud_controller_ng copied to clipboard

Add delete on cascade to fk_svc_inst_op_svc_instance_id

Open kathap opened this issue 3 years ago • 0 comments

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 main branch

  • [X] I have run all the unit tests using bundle exec rake

  • [ ] I have run CF Acceptance Tests

kathap avatar Aug 05 '22 11:08 kathap