Updated

db/migrate / 20190413170618_add_threshold_for_form_entry_to_rate_limits.rb

A
13 lines of codes
2 methods
2.3 complexity/method
1 churn
4.65 complexity
0 duplications
class AddThresholdForFormEntryToRateLimits < ActiveRecord::Migration
  1. AddThresholdForFormEntryToRateLimits has no descriptive comment
def up unless column_exists?(:rate_limits, :threshold_for_form_entry) add_column :rate_limits, :threshold_for_form_entry, :integer, null: false, default: 0 end end def down if column_exists?(:rate_limits, :threshold_for_form_entry) remove_column :rate_limits, :threshold_for_form_entry end end end