about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-01-28 21:14:47 +0100
committerThibaut Girka <thib@sitedethib.com>2019-01-28 21:14:47 +0100
commit42713b97106ffbeb9406d1a7086082a172fc2141 (patch)
treeb7e90b083ddb3f0db2f64692da363bad87e49d64 /db
parente488faaa4ae18f33023b4661eeed0d7643cb9d9c (diff)
parent28866d329bafe676ba2c45e3b449be3d1ba6e9ce (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- README.md: kept our version
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20181116173541_copy_account_stats.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20181116173541_copy_account_stats.rb b/db/migrate/20181116173541_copy_account_stats.rb
index bb523fbbd..8e27eb11b 100644
--- a/db/migrate/20181116173541_copy_account_stats.rb
+++ b/db/migrate/20181116173541_copy_account_stats.rb
@@ -44,7 +44,7 @@ class CopyAccountStats < ActiveRecord::Migration[5.2]
     # uniqueness violations that we need to skip over
     Account.unscoped.select('id, statuses_count, following_count, followers_count, created_at, updated_at').find_each do |account|
       begin
-        params = [[nil, account.id], [nil, account.statuses_count], [nil, account.following_count], [nil, account.followers_count], [nil, account.created_at], [nil, account.updated_at]]
+        params = [[nil, account.id], [nil, account[:statuses_count]], [nil, account[:following_count]], [nil, account[:followers_count]], [nil, account.created_at], [nil, account.updated_at]]
         exec_insert('INSERT INTO account_stats (account_id, statuses_count, following_count, followers_count, created_at, updated_at) VALUES ($1, $2, $3, $4, $5, $6)', nil, params)
       rescue ActiveRecord::RecordNotUnique
         next