Newer
Older
dmpopidor / db / migrate / 20151208142029_add_field_to_guidances.rb
class AddFieldToGuidances < ActiveRecord::Migration
  def change
     add_column :guidances, :published, :boolean

     if table_exists?('guidances')
       Guidance.find_each do |guidance|
          guidance.published = true
          guidance.save!
       end
     end
  end
end