From db884e82db215eebd6599764556518a5e94ca680 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Fri, 28 Apr 2017 13:59:39 +0300 Subject: [PATCH] Revert "Debug migration" This reverts commit 6d2bd0217d33bbc8bdba3e7c3eff14e626e201b6. --- db/migrate/20170423225333_add_zone_to_prices.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/db/migrate/20170423225333_add_zone_to_prices.rb b/db/migrate/20170423225333_add_zone_to_prices.rb index 6a5762b5f..cf866cb97 100644 --- a/db/migrate/20170423225333_add_zone_to_prices.rb +++ b/db/migrate/20170423225333_add_zone_to_prices.rb @@ -14,14 +14,8 @@ class AddZoneToPrices < ActiveRecord::Migration private def assign_zone_to_current_prices - p "Categories: #{Billing::Price.pluck(:category).uniq.sort}" - p "Zone origins: #{DNS::Zone.origins.sort}" - p 'Converting...' - Billing::Price.all.each do |price| - p "Price: #{price.attributes}" - p "Price category: #{price.category}" - zone = DNS::Zone.find_by!(origin: price.category.strip) + zone = DNS::Zone.find_by!(origin: price.category) price.zone = zone price.save! end