Updated

db/migrate / 20160217192016_add_location_code_index_to_country_petition_journal.rb

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