Description:
[grader] +migration, change compiler message type in test_requests to text
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@145 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
r68:131234dac624 - - 2 files changed: 11 inserted, 2 deleted
@@ -0,0 +1,9 | |||||
|
|
1 | + class ChangeCompilerMessageTypeTestRequest < ActiveRecord::Migration | ||
|
|
2 | + def self.up | ||
|
|
3 | + change_column :test_requests, :compiler_message, :text | ||
|
|
4 | + end | ||
|
|
5 | + | ||
|
|
6 | + def self.down | ||
|
|
7 | + change_column :test_requests, :compiler_message, :string | ||
|
|
8 | + end | ||
|
|
9 | + 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 => 21) do |
|
13 |
|
13 | ||
|
14 | create_table "grader_processes", :force => true do |t| |
|
14 | create_table "grader_processes", :force => true do |t| |
|
15 | t.string "host", :limit => 20 |
|
15 | t.string "host", :limit => 20 |
|
16 | t.integer "pid" |
|
16 | t.integer "pid" |
|
17 | t.string "mode" |
|
17 | t.string "mode" |
|
18 | t.boolean "active" |
|
18 | t.boolean "active" |
|
19 | t.datetime "created_at" |
|
19 | t.datetime "created_at" |
|
20 | t.datetime "updated_at" |
|
20 | t.datetime "updated_at" |
|
21 | t.integer "task_id" |
|
21 | t.integer "task_id" |
|
22 | end |
|
22 | end |
|
23 |
|
23 | ||
|
24 | add_index "grader_processes", ["host", "pid"], :name => "index_grader_processes_on_ip_and_pid" |
|
24 | add_index "grader_processes", ["host", "pid"], :name => "index_grader_processes_on_ip_and_pid" |
|
25 |
|
25 | ||
|
26 | create_table "languages", :force => true do |t| |
|
26 | create_table "languages", :force => true do |t| |
|
27 | t.string "name", :limit => 10 |
|
27 | t.string "name", :limit => 10 |
|
28 | t.string "pretty_name" |
|
28 | t.string "pretty_name" |
|
29 | t.string "ext", :limit => 10 |
|
29 | t.string "ext", :limit => 10 |
|
30 | end |
|
30 | end |
|
31 |
|
31 | ||
|
32 | create_table "problems", :force => true do |t| |
|
32 | create_table "problems", :force => true do |t| |
|
33 | t.string "name", :limit => 30 |
|
33 | t.string "name", :limit => 30 |
|
34 | t.string "full_name" |
|
34 | t.string "full_name" |
|
35 | t.integer "full_score" |
|
35 | t.integer "full_score" |
|
36 | t.date "date_added" |
|
36 | t.date "date_added" |
|
37 | t.boolean "available" |
|
37 | t.boolean "available" |
|
38 | t.string "url" |
|
38 | t.string "url" |
|
39 | end |
|
39 | end |
|
40 |
|
40 | ||
|
41 | create_table "rights", :force => true do |t| |
|
41 | create_table "rights", :force => true do |t| |
|
42 | t.string "name" |
|
42 | t.string "name" |
|
43 | t.string "controller" |
|
43 | t.string "controller" |
|
44 | t.string "action" |
|
44 | t.string "action" |
|
45 | end |
|
45 | end |
|
46 |
|
46 | ||
|
47 | create_table "rights_roles", :id => false, :force => true do |t| |
|
47 | create_table "rights_roles", :id => false, :force => true do |t| |
|
48 | t.integer "right_id" |
|
48 | t.integer "right_id" |
|
49 | t.integer "role_id" |
|
49 | t.integer "role_id" |
|
50 | end |
|
50 | end |
|
51 |
|
51 | ||
|
52 | add_index "rights_roles", ["role_id"], :name => "index_rights_roles_on_role_id" |
|
52 | add_index "rights_roles", ["role_id"], :name => "index_rights_roles_on_role_id" |
|
53 |
|
53 | ||
|
54 | create_table "roles", :force => true do |t| |
|
54 | create_table "roles", :force => true do |t| |
|
55 | t.string "name" |
|
55 | t.string "name" |
|
56 | end |
|
56 | end |
|
57 |
|
57 | ||
|
58 | create_table "roles_users", :id => false, :force => true do |t| |
|
58 | create_table "roles_users", :id => false, :force => true do |t| |
|
59 | t.integer "role_id" |
|
59 | t.integer "role_id" |
|
60 | t.integer "user_id" |
|
60 | t.integer "user_id" |
@@ -62,68 +62,68 | |||||
|
62 |
|
62 | ||
|
63 | add_index "roles_users", ["user_id"], :name => "index_roles_users_on_user_id" |
|
63 | add_index "roles_users", ["user_id"], :name => "index_roles_users_on_user_id" |
|
64 |
|
64 | ||
|
65 | create_table "sessions", :force => true do |t| |
|
65 | create_table "sessions", :force => true do |t| |
|
66 | t.string "session_id" |
|
66 | t.string "session_id" |
|
67 | t.text "data" |
|
67 | t.text "data" |
|
68 | t.datetime "updated_at" |
|
68 | t.datetime "updated_at" |
|
69 | end |
|
69 | end |
|
70 |
|
70 | ||
|
71 | add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" |
|
71 | add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" |
|
72 | add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" |
|
72 | add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" |
|
73 |
|
73 | ||
|
74 | create_table "submissions", :force => true do |t| |
|
74 | create_table "submissions", :force => true do |t| |
|
75 | t.integer "user_id" |
|
75 | t.integer "user_id" |
|
76 | t.integer "problem_id" |
|
76 | t.integer "problem_id" |
|
77 | t.integer "language_id" |
|
77 | t.integer "language_id" |
|
78 | t.text "source" |
|
78 | t.text "source" |
|
79 | t.binary "binary" |
|
79 | t.binary "binary" |
|
80 | t.datetime "submitted_at" |
|
80 | t.datetime "submitted_at" |
|
81 | t.datetime "compiled_at" |
|
81 | t.datetime "compiled_at" |
|
82 | t.text "compiler_message" |
|
82 | t.text "compiler_message" |
|
83 | t.datetime "graded_at" |
|
83 | t.datetime "graded_at" |
|
84 | t.integer "points" |
|
84 | t.integer "points" |
|
85 | t.text "grader_comment" |
|
85 | t.text "grader_comment" |
|
86 | t.integer "number" |
|
86 | t.integer "number" |
|
87 | end |
|
87 | end |
|
88 |
|
88 | ||
|
89 | add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true |
|
89 | add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true |
|
90 | add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id" |
|
90 | add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id" |
|
91 |
|
91 | ||
|
92 | create_table "tasks", :force => true do |t| |
|
92 | create_table "tasks", :force => true do |t| |
|
93 | t.integer "submission_id" |
|
93 | t.integer "submission_id" |
|
94 | t.datetime "created_at" |
|
94 | t.datetime "created_at" |
|
95 | t.integer "status" |
|
95 | t.integer "status" |
|
96 | t.datetime "updated_at" |
|
96 | t.datetime "updated_at" |
|
97 | end |
|
97 | end |
|
98 |
|
98 | ||
|
99 | create_table "test_requests", :force => true do |t| |
|
99 | create_table "test_requests", :force => true do |t| |
|
100 | t.integer "user_id" |
|
100 | t.integer "user_id" |
|
101 | t.integer "problem_id" |
|
101 | t.integer "problem_id" |
|
102 | t.integer "submission_id" |
|
102 | t.integer "submission_id" |
|
103 | t.string "input_file_name" |
|
103 | t.string "input_file_name" |
|
104 | t.string "output_file_name" |
|
104 | t.string "output_file_name" |
|
105 | t.string "running_stat" |
|
105 | t.string "running_stat" |
|
106 | t.integer "status" |
|
106 | t.integer "status" |
|
107 | t.datetime "updated_at" |
|
107 | t.datetime "updated_at" |
|
108 | t.datetime "submitted_at" |
|
108 | t.datetime "submitted_at" |
|
109 | t.datetime "compiled_at" |
|
109 | t.datetime "compiled_at" |
|
110 |
- t. |
|
110 | + t.text "compiler_message" |
|
111 | t.datetime "graded_at" |
|
111 | t.datetime "graded_at" |
|
112 | t.string "grader_comment" |
|
112 | t.string "grader_comment" |
|
113 | t.datetime "created_at" |
|
113 | t.datetime "created_at" |
|
114 | end |
|
114 | end |
|
115 |
|
115 | ||
|
116 | add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id" |
|
116 | add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id" |
|
117 |
|
117 | ||
|
118 | create_table "users", :force => true do |t| |
|
118 | create_table "users", :force => true do |t| |
|
119 | t.string "login", :limit => 10 |
|
119 | t.string "login", :limit => 10 |
|
120 | t.string "full_name" |
|
120 | t.string "full_name" |
|
121 | t.string "hashed_password" |
|
121 | t.string "hashed_password" |
|
122 | t.string "salt", :limit => 5 |
|
122 | t.string "salt", :limit => 5 |
|
123 | t.string "alias" |
|
123 | t.string "alias" |
|
124 | t.string "email" |
|
124 | t.string "email" |
|
125 | end |
|
125 | end |
|
126 |
|
126 | ||
|
127 | add_index "users", ["login"], :name => "index_users_on_login", :unique => true |
|
127 | add_index "users", ["login"], :name => "index_users_on_login", :unique => true |
|
128 |
|
128 | ||
|
129 | end |
|
129 | end |
You need to be logged in to leave comments.
Login now