Description:
[web] added runstat columns to test_request
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@161 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r81:bbc4d8cd0ec5 - - 2 files changed: 17 inserted, 1 deleted
@@ -0,0 +1,13 | |||||
|
|
1 | + class AddRunstatColumnsToTestRequest < ActiveRecord::Migration | ||
|
|
2 | + def self.up | ||
|
|
3 | + add_column :test_requests, :running_time, :time | ||
|
|
4 | + add_column :test_requests, :exit_status, :string | ||
|
|
5 | + add_column :test_requests, :memory_usage, :integer | ||
|
|
6 | + end | ||
|
|
7 | + | ||
|
|
8 | + def self.down | ||
|
|
9 | + remove_column :test_requests, :running_time | ||
|
|
10 | + remove_column :test_requests, :exit_status | ||
|
|
11 | + remove_column :test_requests, :memory_usage | ||
|
|
12 | + end | ||
|
|
13 | + end |
@@ -1,60 +1,60 | |||||
|
1 | # This file is auto-generated from the current state of the database. Instead of editing this file, |
|
1 | # This file is auto-generated from the current state of the database. Instead of editing this file, |
|
2 | # please use the migrations feature of ActiveRecord to incrementally modify your database, and |
|
2 | # please use the migrations feature of ActiveRecord to incrementally modify your database, and |
|
3 | # then regenerate this schema definition. |
|
3 | # then regenerate this schema definition. |
|
4 | # |
|
4 | # |
|
5 | # Note that this schema.rb definition is the authoritative source for your database schema. If you need |
|
5 | # Note that this schema.rb definition is the authoritative source for your database schema. If you need |
|
6 | # to create the application database on another system, you should be using db:schema:load, not running |
|
6 | # to create the application database on another system, you should be using db:schema:load, not running |
|
7 | # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations |
|
7 | # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations |
|
8 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
|
8 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
|
9 | # |
|
9 | # |
|
10 | # It's strongly recommended to check this file into your version control system. |
|
10 | # It's strongly recommended to check this file into your version control system. |
|
11 |
|
11 | ||
|
12 |
- ActiveRecord::Schema.define(:version => 2 |
|
12 | + ActiveRecord::Schema.define(:version => 23) do |
|
13 |
|
13 | ||
|
14 | create_table "configurations", :force => true do |t| |
|
14 | create_table "configurations", :force => true do |t| |
|
15 | t.string "key" |
|
15 | t.string "key" |
|
16 | t.string "value_type" |
|
16 | t.string "value_type" |
|
17 | t.string "value" |
|
17 | t.string "value" |
|
18 | t.datetime "created_at" |
|
18 | t.datetime "created_at" |
|
19 | t.datetime "updated_at" |
|
19 | t.datetime "updated_at" |
|
20 | end |
|
20 | end |
|
21 |
|
21 | ||
|
22 | create_table "grader_processes", :force => true do |t| |
|
22 | create_table "grader_processes", :force => true do |t| |
|
23 | t.string "host", :limit => 20 |
|
23 | t.string "host", :limit => 20 |
|
24 | t.integer "pid" |
|
24 | t.integer "pid" |
|
25 | t.string "mode" |
|
25 | t.string "mode" |
|
26 | t.boolean "active" |
|
26 | t.boolean "active" |
|
27 | t.datetime "created_at" |
|
27 | t.datetime "created_at" |
|
28 | t.datetime "updated_at" |
|
28 | t.datetime "updated_at" |
|
29 | t.integer "task_id" |
|
29 | t.integer "task_id" |
|
30 | end |
|
30 | end |
|
31 |
|
31 | ||
|
32 | add_index "grader_processes", ["host", "pid"], :name => "index_grader_processes_on_ip_and_pid" |
|
32 | add_index "grader_processes", ["host", "pid"], :name => "index_grader_processes_on_ip_and_pid" |
|
33 |
|
33 | ||
|
34 | create_table "languages", :force => true do |t| |
|
34 | create_table "languages", :force => true do |t| |
|
35 | t.string "name", :limit => 10 |
|
35 | t.string "name", :limit => 10 |
|
36 | t.string "pretty_name" |
|
36 | t.string "pretty_name" |
|
37 | t.string "ext", :limit => 10 |
|
37 | t.string "ext", :limit => 10 |
|
38 | end |
|
38 | end |
|
39 |
|
39 | ||
|
40 | create_table "problems", :force => true do |t| |
|
40 | create_table "problems", :force => true do |t| |
|
41 | t.string "name", :limit => 30 |
|
41 | t.string "name", :limit => 30 |
|
42 | t.string "full_name" |
|
42 | t.string "full_name" |
|
43 | t.integer "full_score" |
|
43 | t.integer "full_score" |
|
44 | t.date "date_added" |
|
44 | t.date "date_added" |
|
45 | t.boolean "available" |
|
45 | t.boolean "available" |
|
46 | t.string "url" |
|
46 | t.string "url" |
|
47 | end |
|
47 | end |
|
48 |
|
48 | ||
|
49 | create_table "rights", :force => true do |t| |
|
49 | create_table "rights", :force => true do |t| |
|
50 | t.string "name" |
|
50 | t.string "name" |
|
51 | t.string "controller" |
|
51 | t.string "controller" |
|
52 | t.string "action" |
|
52 | t.string "action" |
|
53 | end |
|
53 | end |
|
54 |
|
54 | ||
|
55 | create_table "rights_roles", :id => false, :force => true do |t| |
|
55 | create_table "rights_roles", :id => false, :force => true do |t| |
|
56 | t.integer "right_id" |
|
56 | t.integer "right_id" |
|
57 | t.integer "role_id" |
|
57 | t.integer "role_id" |
|
58 | end |
|
58 | end |
|
59 |
|
59 | ||
|
60 | add_index "rights_roles", ["role_id"], :name => "index_rights_roles_on_role_id" |
|
60 | add_index "rights_roles", ["role_id"], :name => "index_rights_roles_on_role_id" |
@@ -74,64 +74,67 | |||||
|
74 | t.string "session_id" |
|
74 | t.string "session_id" |
|
75 | t.text "data" |
|
75 | t.text "data" |
|
76 | t.datetime "updated_at" |
|
76 | t.datetime "updated_at" |
|
77 | end |
|
77 | end |
|
78 |
|
78 | ||
|
79 | add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" |
|
79 | add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" |
|
80 | add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" |
|
80 | add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" |
|
81 |
|
81 | ||
|
82 | create_table "submissions", :force => true do |t| |
|
82 | create_table "submissions", :force => true do |t| |
|
83 | t.integer "user_id" |
|
83 | t.integer "user_id" |
|
84 | t.integer "problem_id" |
|
84 | t.integer "problem_id" |
|
85 | t.integer "language_id" |
|
85 | t.integer "language_id" |
|
86 | t.text "source" |
|
86 | t.text "source" |
|
87 | t.binary "binary" |
|
87 | t.binary "binary" |
|
88 | t.datetime "submitted_at" |
|
88 | t.datetime "submitted_at" |
|
89 | t.datetime "compiled_at" |
|
89 | t.datetime "compiled_at" |
|
90 | t.text "compiler_message" |
|
90 | t.text "compiler_message" |
|
91 | t.datetime "graded_at" |
|
91 | t.datetime "graded_at" |
|
92 | t.integer "points" |
|
92 | t.integer "points" |
|
93 | t.text "grader_comment" |
|
93 | t.text "grader_comment" |
|
94 | t.integer "number" |
|
94 | t.integer "number" |
|
95 | end |
|
95 | end |
|
96 |
|
96 | ||
|
97 | add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true |
|
97 | add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true |
|
98 | add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id" |
|
98 | add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id" |
|
99 |
|
99 | ||
|
100 | create_table "tasks", :force => true do |t| |
|
100 | create_table "tasks", :force => true do |t| |
|
101 | t.integer "submission_id" |
|
101 | t.integer "submission_id" |
|
102 | t.datetime "created_at" |
|
102 | t.datetime "created_at" |
|
103 | t.integer "status" |
|
103 | t.integer "status" |
|
104 | t.datetime "updated_at" |
|
104 | t.datetime "updated_at" |
|
105 | end |
|
105 | end |
|
106 |
|
106 | ||
|
107 | create_table "test_requests", :force => true do |t| |
|
107 | create_table "test_requests", :force => true do |t| |
|
108 | t.integer "user_id" |
|
108 | t.integer "user_id" |
|
109 | t.integer "problem_id" |
|
109 | t.integer "problem_id" |
|
110 | t.integer "submission_id" |
|
110 | t.integer "submission_id" |
|
111 | t.string "input_file_name" |
|
111 | t.string "input_file_name" |
|
112 | t.string "output_file_name" |
|
112 | t.string "output_file_name" |
|
113 | t.string "running_stat" |
|
113 | t.string "running_stat" |
|
114 | t.integer "status" |
|
114 | t.integer "status" |
|
115 | t.datetime "updated_at" |
|
115 | t.datetime "updated_at" |
|
116 | t.datetime "submitted_at" |
|
116 | t.datetime "submitted_at" |
|
117 | t.datetime "compiled_at" |
|
117 | t.datetime "compiled_at" |
|
118 | t.text "compiler_message" |
|
118 | t.text "compiler_message" |
|
119 | t.datetime "graded_at" |
|
119 | t.datetime "graded_at" |
|
120 | t.string "grader_comment" |
|
120 | t.string "grader_comment" |
|
121 | t.datetime "created_at" |
|
121 | t.datetime "created_at" |
|
|
122 | + t.time "running_time" | ||
|
|
123 | + t.string "exit_status" | ||
|
|
124 | + t.integer "memory_usage" | ||
|
122 | end |
|
125 | end |
|
123 |
|
126 | ||
|
124 | add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id" |
|
127 | add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id" |
|
125 |
|
128 | ||
|
126 | create_table "users", :force => true do |t| |
|
129 | create_table "users", :force => true do |t| |
|
127 | t.string "login", :limit => 10 |
|
130 | t.string "login", :limit => 10 |
|
128 | t.string "full_name" |
|
131 | t.string "full_name" |
|
129 | t.string "hashed_password" |
|
132 | t.string "hashed_password" |
|
130 | t.string "salt", :limit => 5 |
|
133 | t.string "salt", :limit => 5 |
|
131 | t.string "alias" |
|
134 | t.string "alias" |
|
132 | t.string "email" |
|
135 | t.string "email" |
|
133 | end |
|
136 | end |
|
134 |
|
137 | ||
|
135 | add_index "users", ["login"], :name => "index_users_on_login", :unique => true |
|
138 | add_index "users", ["login"], :name => "index_users_on_login", :unique => true |
|
136 |
|
139 | ||
|
137 | end |
|
140 | end |
You need to be logged in to leave comments.
Login now