Project

General

Profile

Download (295 Bytes) Statistics
| Branch: | Tag: | Revision:
class ChangeHostBuildDefaultToFalse < ActiveRecord::Migration[4.2]
def up
change_column :hosts, :build, :boolean, :default => false

Host.unscoped.find_each {|h| h.update_attribute :build, false}
end

def down
change_column :hosts, :build, :boolean, :default => true
end
end
(19-19/409)