Sha256: ed034fc6718a21e0bfc8abecf059c1401a57bdbc3b41536b82262de818ed2983
Contents?: true
Size: 678 Bytes
Versions: 195
Compression:
Stored size: 678 Bytes
Contents
class MoveSystemDescriptionToHost < ActiveRecord::Migration[4.2] class Host < ApplicationRecord self.table_name = "hosts" end class System < ApplicationRecord self.table_name = "katello_systems" end def up add_column :hosts, :description, :text System.find_each do |system| system.foreman_host.update_attribute(:description, system.description) end remove_column :katello_systems, :description end def down add_column :katello_systems, :description, :text System.find_each do |system| system.update_attribute(:description, system.foreman_host.description) end remove_column :hosts, :description end end
Version data entries
195 entries across 195 versions & 1 rubygems