Sha256: c03244393e826704444d6a7b06717ec7e6e5820d110767b5ad1d67b625fec27b

Contents?: true

Size: 453 Bytes

Versions: 24

Compression:

Stored size: 453 Bytes

Contents

class AddSmartProxyDownloadPolicy < ActiveRecord::Migration
  def up
    #set default to on_demand, but update existing proxies to inherit
    add_column :smart_proxies, :download_policy, :string, :null => true
    SmartProxy.reset_column_information
    SmartProxy.all.each do |proxy|
      proxy.update_attributes(:download_policy => SmartProxy::DOWNLOAD_INHERIT)
    end
  end

  def down
    remove_column :smart_proxies, :download_policy
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
katello-3.5.2 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.5.1.1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.5.1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.5.0.1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.5.0 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.5.0.rc2 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.5.0.rc1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.4.5 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.4.4 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.4.2 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.4.1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.4.0.2 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.4.0.1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.3.2 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.4.0 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.4.0.rc2 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.4.0.rc1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.3.1.1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.3.1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb
katello-3.3.0.1 db/migrate/20160930150810_add_smart_proxy_download_policy.rb