Updated

db/migrate / 20170711112737_add_index_to_signatures_archived_at.rb

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