diff options
-rw-r--r-- | db/migrate/20161202132159_add_in_reply_to_account_id_to_statuses.rb | 2 | ||||
-rw-r--r-- | db/migrate/20170209184350_add_reply_to_statuses.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20161202132159_add_in_reply_to_account_id_to_statuses.rb b/db/migrate/20161202132159_add_in_reply_to_account_id_to_statuses.rb index 2c24b53d0..3a559ccd6 100644 --- a/db/migrate/20161202132159_add_in_reply_to_account_id_to_statuses.rb +++ b/db/migrate/20161202132159_add_in_reply_to_account_id_to_statuses.rb @@ -3,7 +3,7 @@ class AddInReplyToAccountIdToStatuses < ActiveRecord::Migration[5.0] add_column :statuses, :in_reply_to_account_id, :integer, null: true, default: nil ActiveRecord::Base.transaction do - Status.where.not(in_reply_to_id: nil).includes(:thread).find_each do |status| + Status.unscoped.where.not(in_reply_to_id: nil).includes(:thread).find_each do |status| next if status.thread.nil? status.in_reply_to_account_id = status.thread.account_id diff --git a/db/migrate/20170209184350_add_reply_to_statuses.rb b/db/migrate/20170209184350_add_reply_to_statuses.rb index c5074728b..b8b5c1306 100644 --- a/db/migrate/20170209184350_add_reply_to_statuses.rb +++ b/db/migrate/20170209184350_add_reply_to_statuses.rb @@ -1,7 +1,7 @@ class AddReplyToStatuses < ActiveRecord::Migration[5.0] def up add_column :statuses, :reply, :boolean, nil: false, default: false - Status.update_all('reply = (in_reply_to_id IS NOT NULL)') + Status.unscoped.update_all('reply = (in_reply_to_id IS NOT NULL)') end def down |