Updated

db/migrate / 20170626123257_add_index_to_petitions_archived_at.rb

A
15 lines of codes
2 methods
2.3 complexity/method
1 churn
4.65 complexity
0 duplications
class AddIndexToPetitionsArchivedAt < ActiveRecord::Migration
  1. AddIndexToPetitionsArchivedAt has no descriptive comment
disable_ddl_transaction! def up unless index_exists?(:petitions, :archived_at) add_index :petitions, :archived_at, algorithm: :concurrently end end def down if index_exists?(:petitions, :archived_at) remove_index :petitions, :archived_at end end end