]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb
Merge remote-tracking branch 'upstream/pull/5311'
[rails.git] / db / migrate / 20161011010929_subscribe_authors_to_diary_entries.rb
index 2dfbbf2c8c84360ca428d2f3e4a11493ed41e778..996d2c9b2aa9cd74e204ae429f4b62fa8641ddb2 100644 (file)
@@ -1,10 +1,5 @@
-class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration
-  def up
-    DiaryEntry.find_each do |diary_entry|
-      diary_entry.subscriptions.create(:user => diary_entry.user) unless diary_entry.subscribers.exists?(diary_entry.user.id)
-    end
-  end
+class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration[4.2]
+  def up; end
 
 
-  def down
-  end
+  def down; end
 end
 end