Updated

db/migrate / 20150701174136_add_debate_outcome_at_to_petitions.rb

A
18 lines of codes
2 methods
1.5 complexity/method
1 churn
3.0 complexity
0 duplications
class AddDebateOutcomeAtToPetitions < ActiveRecord::Migration
  1. AddDebateOutcomeAtToPetitions has no descriptive comment
def up add_column :petitions, :debate_outcome_at, :datetime execute <<-SQL UPDATE petitions AS p SET debate_outcome_at = d.created_at FROM debate_outcomes AS d WHERE p.id = d.petition_id SQL end def down remove_column :petitions, :debate_outcome_at end end