Updated

db/migrate / 20160822064645_add_ip_address_index_to_signatures.rb

B
15 lines of codes
2 methods
2.3 complexity/method
1 churn
4.65 complexity
16 duplications
class AddIpAddressIndexToSignatures < ActiveRecord::Migration
  1. AddIpAddressIndexToSignatures has no descriptive comment
disable_ddl_transaction! def up
  1. Similar code found in 4 nodes Locations: 0 1 2 3
unless index_exists?(:signatures, [:ip_address, :petition_id]) add_index :signatures, [:ip_address, :petition_id], algorithm: :concurrently end end def down if index_exists?(:signatures, [:ip_address, :petition_id]) remove_index :signatures, [:ip_address, :petition_id] end end end