add cause to testruns

trigger run and assess on request_for_comment
This commit is contained in:
Ralf Teusner
2017-09-13 13:28:31 +02:00
committed by Maximilian Grundke
parent 6dc34d3ebe
commit 194984a620
8 changed files with 53 additions and 18 deletions

View 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