diff --git a/db/migrate/023_add_runstat_columns_to_test_request.rb b/db/migrate/023_add_runstat_columns_to_test_request.rb new file mode 100644 --- /dev/null +++ b/db/migrate/023_add_runstat_columns_to_test_request.rb @@ -0,0 +1,13 @@ +class AddRunstatColumnsToTestRequest < ActiveRecord::Migration + def self.up + add_column :test_requests, :running_time, :time + add_column :test_requests, :exit_status, :string + add_column :test_requests, :memory_usage, :integer + end + + def self.down + remove_column :test_requests, :running_time + remove_column :test_requests, :exit_status + remove_column :test_requests, :memory_usage + end +end diff --git a/db/schema.rb b/db/schema.rb --- a/db/schema.rb +++ b/db/schema.rb @@ -9,7 +9,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 22) do +ActiveRecord::Schema.define(:version => 23) do create_table "configurations", :force => true do |t| t.string "key" @@ -119,6 +119,9 @@ t.datetime "graded_at" t.string "grader_comment" t.datetime "created_at" + t.time "running_time" + t.string "exit_status" + t.integer "memory_usage" end add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id"