Updated

db/migrate / 20170610132850_add_registration_closed_at_to_parliament.rb

A
14 lines of codes
2 methods
2.1 complexity/method
1 churn
4.16 complexity
0 duplications
class AddRegistrationClosedAtToParliament < ActiveRecord::Migration
  1. AddRegistrationClosedAtToParliament has no descriptive comment
class Parliament < ActiveRecord::Base; end
  1. AddRegistrationClosedAtToParliament::Parliament has no descriptive comment
def up add_column :parliaments, :registration_closed_at, :datetime parliament = Parliament.first! parliament.update!(registration_closed_at: "2017-05-22T23:59:59.999999+01:00") end def down remove_column :parliaments, :registration_closed_at end end