X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbd88d893f3c3fce9cafd666b94396988646d81f..227c402ad10059ec35394f2a960a620e5cda73af:/db/migrate/20150111192335_subscribe_old_changesets.rb diff --git a/db/migrate/20150111192335_subscribe_old_changesets.rb b/db/migrate/20150111192335_subscribe_old_changesets.rb index cca8293f5..94b3bb565 100644 --- a/db/migrate/20150111192335_subscribe_old_changesets.rb +++ b/db/migrate/20150111192335_subscribe_old_changesets.rb @@ -1,4 +1,7 @@ -class SubscribeOldChangesets < ActiveRecord::Migration +class SubscribeOldChangesets < ActiveRecord::Migration[4.2] + class Changeset < ActiveRecord::Base + end + def up Changeset.find_each do |changeset| changeset.subscribers << changeset.user unless changeset.subscribers.exists?(changeset.user.id)