From 641ecd4677b0c95fdbf83a8b4429c51c39e603aa Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 3 Sep 2018 20:43:38 +0800 Subject: [PATCH] Prevent upsert operation Only works in newer postgresql, but also not really necessary because the table is brandnew there. --- db/migrate/20180812173710_copy_status_stats.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/db/migrate/20180812173710_copy_status_stats.rb b/db/migrate/20180812173710_copy_status_stats.rb index 850aa9c13..9b4f2128c 100644 --- a/db/migrate/20180812173710_copy_status_stats.rb +++ b/db/migrate/20180812173710_copy_status_stats.rb @@ -9,8 +9,6 @@ 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