Revert "Prevent upsert operation"
This reverts commit 641ecd4677b0c95fdbf83a8b4429c51c39e603aa.
This commit is contained in:
parent
641ecd4677
commit
18c4e7ecb1
@ -9,6 +9,8 @@ class CopyStatusStats < ActiveRecord::Migration[5.2]
|
||||
SELECT id, reblogs_count, favourites_count, created_at, updated_at
|
||||
FROM statuses
|
||||
WHERE id IN (#{statuses.map(&:id).join(', ')})
|
||||
ON CONFLICT (status_id) DO UPDATE
|
||||
SET reblogs_count = EXCLUDED.reblogs_count, favourites_count = EXCLUDED.favourites_count
|
||||
SQL
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user