Avoid more models in old migrations
[rails.git] / db / migrate / 20161011010929_subscribe_authors_to_diary_entries.rb
index a02f52f..76fa1fa 100644 (file)
@@ -1,4 +1,7 @@
 class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration[4.2]
 class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration[4.2]
+  class DiaryEntry < ActiveRecord::Base
+  end
+
   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)
   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)