Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Sequel.migration do
up do
# We are assuming with this DB migration that the service_bindings table currently
# has no duplicate rows, according to the unique constraint of
# (service_instance_guid, app_guid). This migration will fail otherwise.
#
# Please manually remove duplicate entries from the database if
# this migration is failing.

alter_table :service_bindings do
add_unique_constraint [:service_instance_guid, :app_guid], name: :unique_service_binding_service_instance_guid_app_guid
add_unique_constraint [:app_id, :route_id, :app_port], name: :apps_routes_app_id_route_id_app_port_key
end
end

down do
alter_table :service_bindings do
drop_constraint :unique_service_binding_service_instance_guid_app_guid
end
end
end