about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-10-07 06:05:14 +0200
committerGitHub <noreply@github.com>2019-10-07 06:05:14 +0200
commitebe574d5b57c647450cab3d4ca2e8ca52c4fb3fe (patch)
tree25333ed59bbab747c6ba91b5db55ad658aeebaab /db
parent6c9b4f6b7710cbbdafcceafb59dfef0be6baba65 (diff)
Fix old migration trying to use new column due to default status scope (#12095)
Fix #12087
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20181024224956_migrate_account_conversations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20181024224956_migrate_account_conversations.rb b/db/migrate/20181024224956_migrate_account_conversations.rb
index b718f9e1d..d4bc3b91d 100644
--- a/db/migrate/20181024224956_migrate_account_conversations.rb
+++ b/db/migrate/20181024224956_migrate_account_conversations.rb
@@ -52,6 +52,6 @@ class MigrateAccountConversations < ActiveRecord::Migration[5.2]
   end
 
   def notifications_about_direct_statuses
-    Notification.joins(mention: :status).where(activity_type: 'Mention', statuses: { visibility: :direct })
+    Notification.joins('INNER JOIN mentions ON mentions.id = notifications.activity_id INNER JOIN statuses ON statuses.id = mentions.status_id').where(activity_type: 'Mention', statuses: { visibility: :direct })
   end
 end