DEV: Fix build

Follow up to 0653750fbf.
This commit is contained in:
Dan Ungureanu 2020-04-07 17:10:05 +03:00
parent 0653750fbf
commit 2e8f54e9ee
No known key found for this signature in database
GPG Key ID: 0AA2A00D6ACC8B84
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class AddKeyHashToUserApiKey < ActiveRecord::Migration[6.0]
loop do
rows = DB
.query("SELECT id, key FROM user_api_keys WHERE key_hash IS NULL LIMIT #{batch_size}")
.map { |row| { id: row.id, key_hash: Digest::SHA256.hexdigest(key) } }
.map { |row| { id: row.id, key_hash: Digest::SHA256.hexdigest(row.key) } }
break if rows.size == 0