Files
leadchat/db/migrate/20260226084618_backfill_webhook_secrets.rb

12 lines
278 B
Ruby

class BackfillWebhookSecrets < ActiveRecord::Migration[7.1]
def up
Webhook.find_each do |webhook|
webhook.update!(secret: SecureRandom.urlsafe_base64(24))
end
end
def down
# no-op: removing the column in the previous migration handles cleanup
end
end