summaryrefslogtreecommitdiff
path: root/db/migrate/20210429181325_add_failure_tracking_to_web_hooks.rb
blob: 4a34c2dd3073b203a42d7e87a1055bd460c8adbb (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

class AddFailureTrackingToWebHooks < ActiveRecord::Migration[6.0]
  def change
    change_table(:web_hooks, bulk: true) do |t|
      t.integer :recent_failures, null: false, limit: 2, default: 0
      t.integer :backoff_count, null: false, limit: 2, default: 0
      t.column :disabled_until, :timestamptz
    end
  end
end