Fix older migrations not working due to new default scope (#11983)

Fix #11952, regression from #11623
This commit is contained in:
Eugen Rochko
2019-09-28 01:05:26 +02:00
committed by GitHub
parent ab33c4df94
commit 27719a4001
2 changed files with 2 additions and 2 deletions

View File

@ -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