Files
openfoodnetwork/db/migrate/20221028051650_create_webhook_endpoints.rb
David Cook 85c98c6d3e 2. Add model WebhookEndpoint [migration]
This will store the URL for each user that wants a notification.

We probably don't need URL validation (it's not done on Enterprise for example). It could be validated by browser input, and anyway will be validated if the webhook actually works or not.

Inspired by Keygen: https://keygen.sh/blog/how-to-build-a-webhook-system-in-rails-using-sidekiq/
2023-03-07 15:38:50 +11:00

12 lines
230 B
Ruby

# frozen_string_literal: true
class CreateWebhookEndpoints < ActiveRecord::Migration[6.1]
def change
create_table :webhook_endpoints do |t|
t.string :url, null: false
t.timestamps null: false
end
end
end