Updated

db/migrate / 20190323135704_add_last_signed_at_to_journals.rb

A
21 lines of codes
2 methods
4.7 complexity/method
1 churn
9.3 complexity
0 duplications
class AddLastSignedAtToJournals < ActiveRecord::Migration
  1. AddLastSignedAtToJournals has no descriptive comment
def up unless column_exists?(:constituency_petition_journals, :last_signed_at) add_column :constituency_petition_journals, :last_signed_at, :datetime end unless column_exists?(:country_petition_journals, :last_signed_at) add_column :country_petition_journals, :last_signed_at, :datetime end end def down if column_exists?(:constituency_petition_journals, :last_signed_at) remove_column :constituency_petition_journals, :last_signed_at end if column_exists?(:country_petition_journals, :last_signed_at) remove_column :country_petition_journals, :last_signed_at end end end