add cause to testruns
trigger run and assess on request_for_comment
This commit is contained in:

committed by
Maximilian Grundke

parent
6dc34d3ebe
commit
194984a620
18
db/migrate/20170830083601_add_cause_to_testruns.rb
Normal file
18
db/migrate/20170830083601_add_cause_to_testruns.rb
Normal file
@ -0,0 +1,18 @@
|
||||
class AddCauseToTestruns < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :testruns, :cause, :string
|
||||
Testrun.reset_column_information
|
||||
Testrun.all.each{ |testrun|
|
||||
if(testrun.submission.nil?)
|
||||
say_with_time "#{testrun.id} has no submission" do end
|
||||
else
|
||||
testrun.cause = testrun.submission.cause
|
||||
testrun.save
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :testruns, :cause
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user