A platform for community discussion. Free, open, simple.
DEV: Fix build
Dan Ungureanu2e8f54e9ee72
diff --git a/db/migrate/20200403100259_add_key_hash_to_user_api_key.rb b/db/migrate/20200403100259_add_key_hash_to_user_api_key.rbindex 2e998fc2558..138cf28b553 100644--- a/db/migrate/20200403100259_add_key_hash_to_user_api_key.rb+++ b/db/migrate/20200403100259_add_key_hash_to_user_api_key.rb@@ -8,7 +8,7 @@ class AddKeyHashToUserApiKey < ActiveRecord::Migration[6.0]loop dorows = 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