From 7d967f395dce29dfe195ff80438cff938f125604 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Wed, 22 May 2024 16:00:59 -0400 Subject: [PATCH] Fix missing end preventing the down migration from running in rails 7 --- ...1170303_fix_child_container_manager_sti.rb | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/db/migrate/20220111170303_fix_child_container_manager_sti.rb b/db/migrate/20220111170303_fix_child_container_manager_sti.rb index 956bcf27c..a907cdd61 100644 --- a/db/migrate/20220111170303_fix_child_container_manager_sti.rb +++ b/db/migrate/20220111170303_fix_child_container_manager_sti.rb @@ -46,18 +46,17 @@ def up ServiceParametersSet.in_my_region.where(:ext_management_system => managers).update_all(:type => "#{provider_klass}::ServiceParametersSet") end end + end - def down - PROVIDERS.each do |provider| - provider_klass = "ManageIQ::Providers::#{provider}::ContainerManager" - say_with_time("Resetting STI class for #{provider_klass}") do - managers = ExtManagementSystem.in_my_region.where(:type => provider_klass) - - ContainerTemplate.in_my_region.where(:ext_management_system => managers).update_all(:type => nil) - ServiceInstance.in_my_region.where(:ext_management_system => managers).update_all(:type => nil) - ServiceOffering.in_my_region.where(:ext_management_system => managers).update_all(:type => nil) - ServiceParametersSet.in_my_region.where(:ext_management_system => managers).update_all(:type => nil) - end + def down + PROVIDERS.each do |provider| + provider_klass = "ManageIQ::Providers::#{provider}::ContainerManager" + say_with_time("Resetting STI class for #{provider_klass}") do + managers = ExtManagementSystem.in_my_region.where(:type => provider_klass) + ContainerTemplate.in_my_region.where(:ext_management_system => managers).update_all(:type => nil) + ServiceInstance.in_my_region.where(:ext_management_system => managers).update_all(:type => nil) + ServiceOffering.in_my_region.where(:ext_management_system => managers).update_all(:type => nil) + ServiceParametersSet.in_my_region.where(:ext_management_system => managers).update_all(:type => nil) end end end