Sha256: 84fc8f73be65cd60cd0f809732f2a997ad3afd7d7d374e0af5fcadde722734d4
Contents?: true
Size: 675 Bytes
Versions: 31
Compression:
Stored size: 675 Bytes
Contents
class MoveSystemDescriptionToHost < ActiveRecord::Migration class Host < ActiveRecord::Base self.table_name = "hosts" end class System < ActiveRecord::Base 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
31 entries across 31 versions & 1 rubygems