Updated

db/migrate / 20160819062058_add_state_index_to_signatures.rb

B
15 lines of codes
2 methods
2.3 complexity/method
1 churn
4.65 complexity
16 duplications
class AddStateIndexToSignatures < ActiveRecord::Migration
  1. AddStateIndexToSignatures 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, [:state, :petition_id]) add_index :signatures, [:state, :petition_id], algorithm: :concurrently end end def down if index_exists?(:signatures, [:state, :petition_id]) remove_index :signatures, [:state, :petition_id] end end end