Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/models/runtime/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def shared_or_owned_by(organization_ids)
join_table: 'organizations_private_domains',
left_key: :private_domain_id,
right_key: :organization_id,
before_add: :validate_add_shared_organization
before_add: :validate_add_shared_organization,
ignored_unique_constraint_violation_errors: %w[orgs_pd_ids]
)

add_association_dependencies(
Expand Down
3 changes: 2 additions & 1 deletion app/models/runtime/route.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class InvalidOrganizationRelation < CloudController::Errors::InvalidRelation; en
right_key: :target_space_guid,
right_primary_key: :guid,
join_table: :route_shares,
class: VCAP::CloudController::Space
class: VCAP::CloudController::Space,
ignored_unique_constraint_violation_errors: %w[route_shares.PRIMARY route_target_space_pk]

one_to_one :route_binding
one_through_one :service_instance, join_table: :route_bindings
Expand Down
3 changes: 2 additions & 1 deletion app/models/services/service_instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class InvalidServiceBinding < StandardError; end
right_key: :target_space_guid,
right_primary_key: :guid,
join_table: :service_instance_shares,
class: VCAP::CloudController::Space
class: VCAP::CloudController::Space,
ignored_unique_constraint_violation_errors: %w[service_instance_shares.PRIMARY service_instance_target_space_pk]

many_to_many :routes, join_table: :route_bindings

Expand Down