foodsoft/db/migrate/20090731132547_add_stats_to_groups.rb
2020-09-05 14:40:11 +02:00

11 lines
222 B
Ruby

class AddStatsToGroups < ActiveRecord::Migration[4.2]
def self.up
add_column :groups, :stats, :text
Ordergroup.all.each { |o| o.update_stats! }
end
def self.down
remove_column :groups, :stats
end
end