Revision 56875aaf
Added by Ohad Levy about 13 years ago
- ID 56875aaf1180cdae93d7d8a73e89f663db5b6166
db/migrate/20110301154453_add_managed_to_hosts.rb | ||
---|---|---|
Host.reset_column_information
|
||
|
||
for host in Host.all
|
||
host.update_attribute :managed, host.operatingsystem_id and host.architecture_id and (host.ptable_id or not host.disk.empty?)
|
||
host.update_attribute :managed, !!host.operatingsystem_id and !!host.architecture_id and (!!host.ptable_id or not host.disk.empty?)
|
||
end
|
||
end
|
||
|
Also available in: Unified diff
fixes #733 - All hosts are unmanaged after #641