ad23026d012449609b2e2bbd09b67151a2a3ad0c
[rails.git] / db / migrate / 20150111192335_subscribe_old_changesets.rb
1 class SubscribeOldChangesets < ActiveRecord::Migration[4.2]
2   def up
3     Changeset.find_each do |changeset|
4       changeset.subscribers << changeset.user unless changeset.subscribers.exists?(changeset.user.id)
5     end
6   end
7
8   def down; end
9 end