mirror of
https://github.com/discourse/discourse.git
synced 2025-06-08 00:27:32 +08:00
DEV: Fix build
Follow up to 0653750fbf7d690f96ef064932b3dd44550bcb45.
This commit is contained in:
@ -8,7 +8,7 @@ class AddKeyHashToUserApiKey < ActiveRecord::Migration[6.0]
|
|||||||
loop do
|
loop do
|
||||||
rows = DB
|
rows = DB
|
||||||
.query("SELECT id, key FROM user_api_keys WHERE key_hash IS NULL LIMIT #{batch_size}")
|
.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
|
break if rows.size == 0
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user