diff --git a/db/migrate/20190110212005_create_reviewable_histories.rb b/db/migrate/20190110212005_create_reviewable_histories.rb index 54f7718d1c2..0255eecd339 100644 --- a/db/migrate/20190110212005_create_reviewable_histories.rb +++ b/db/migrate/20190110212005_create_reviewable_histories.rb @@ -28,7 +28,8 @@ class CreateReviewableHistories < ActiveRecord::Migration[5.2] r.created_at, r.created_at FROM reviewables AS r - WHERE r.type = 'ReviewableUser' + WHERE r.status = 0 + AND r.type = 'ReviewableUser' SQL end end