foreman/db/migrate/20180625082051_remove_associations_from_ptable_snippets.rb @ 5655a7ac
5655a7ac | Ondřej Pražák | class RemoveAssociationsFromPtableSnippets < ActiveRecord::Migration[5.1]
|
|
def up
|
|||
Ptable.unscoped.where(:snippet => true).where.not(:os_family => [nil, ""]).map do |ptable|
|
|||
ptable.os_family = nil
|
|||
ptable.save!
|
|||
end
|
|||
end
|
|||
end
|