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,36 +1,36 | |||||
|
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" |
@@ -86,44 +86,44 | |||||
|
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