Sha256: f242a6aa5bf98b42a673ee1169223e02b22249a065eda78456b9c4254f3a9693
Contents?: true
Size: 390 Bytes
Versions: 5
Compression:
Stored size: 390 Bytes
Contents
class AddManagedToHosts < ActiveRecord::Migration def self.up add_column :hosts, :managed, :boolean Host.reset_column_information for host in Host.unscoped.all host.update_attribute :managed, !!host.operatingsystem_id and !!host.architecture_id and (!!host.ptable_id or not host.disk.empty?) end end def self.down remove_column :hosts, :managed end end
Version data entries
5 entries across 5 versions & 1 rubygems