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:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

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 1 # This file is auto-generated from the current state of the database. Instead of editing this file,
2 2 # please use the migrations feature of ActiveRecord to incrementally modify your database, and
3 3 # then regenerate this schema definition.
4 4 #
5 5 # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6 6 # to create the application database on another system, you should be using db:schema:load, not running
7 7 # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8 8 # you'll amass, the slower it'll run and the greater likelihood for issues).
9 9 #
10 10 # It's strongly recommended to check this file into your version control system.
11 11
12 - ActiveRecord::Schema.define(:version => 20) do
12 + ActiveRecord::Schema.define(:version => 21) do
13 13
14 14 create_table "grader_processes", :force => true do |t|
15 15 t.string "host", :limit => 20
16 16 t.integer "pid"
17 17 t.string "mode"
18 18 t.boolean "active"
19 19 t.datetime "created_at"
20 20 t.datetime "updated_at"
21 21 t.integer "task_id"
22 22 end
23 23
24 24 add_index "grader_processes", ["host", "pid"], :name => "index_grader_processes_on_ip_and_pid"
25 25
26 26 create_table "languages", :force => true do |t|
27 27 t.string "name", :limit => 10
28 28 t.string "pretty_name"
29 29 t.string "ext", :limit => 10
30 30 end
31 31
32 32 create_table "problems", :force => true do |t|
33 33 t.string "name", :limit => 30
34 34 t.string "full_name"
35 35 t.integer "full_score"
36 36 t.date "date_added"
37 37 t.boolean "available"
38 38 t.string "url"
39 39 end
40 40
41 41 create_table "rights", :force => true do |t|
42 42 t.string "name"
43 43 t.string "controller"
44 44 t.string "action"
45 45 end
46 46
47 47 create_table "rights_roles", :id => false, :force => true do |t|
48 48 t.integer "right_id"
49 49 t.integer "role_id"
50 50 end
51 51
52 52 add_index "rights_roles", ["role_id"], :name => "index_rights_roles_on_role_id"
53 53
54 54 create_table "roles", :force => true do |t|
55 55 t.string "name"
56 56 end
57 57
58 58 create_table "roles_users", :id => false, :force => true do |t|
59 59 t.integer "role_id"
60 60 t.integer "user_id"
@@ -62,68 +62,68
62 62
63 63 add_index "roles_users", ["user_id"], :name => "index_roles_users_on_user_id"
64 64
65 65 create_table "sessions", :force => true do |t|
66 66 t.string "session_id"
67 67 t.text "data"
68 68 t.datetime "updated_at"
69 69 end
70 70
71 71 add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
72 72 add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
73 73
74 74 create_table "submissions", :force => true do |t|
75 75 t.integer "user_id"
76 76 t.integer "problem_id"
77 77 t.integer "language_id"
78 78 t.text "source"
79 79 t.binary "binary"
80 80 t.datetime "submitted_at"
81 81 t.datetime "compiled_at"
82 82 t.text "compiler_message"
83 83 t.datetime "graded_at"
84 84 t.integer "points"
85 85 t.text "grader_comment"
86 86 t.integer "number"
87 87 end
88 88
89 89 add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true
90 90 add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id"
91 91
92 92 create_table "tasks", :force => true do |t|
93 93 t.integer "submission_id"
94 94 t.datetime "created_at"
95 95 t.integer "status"
96 96 t.datetime "updated_at"
97 97 end
98 98
99 99 create_table "test_requests", :force => true do |t|
100 100 t.integer "user_id"
101 101 t.integer "problem_id"
102 102 t.integer "submission_id"
103 103 t.string "input_file_name"
104 104 t.string "output_file_name"
105 105 t.string "running_stat"
106 106 t.integer "status"
107 107 t.datetime "updated_at"
108 108 t.datetime "submitted_at"
109 109 t.datetime "compiled_at"
110 - t.string "compiler_message"
110 + t.text "compiler_message"
111 111 t.datetime "graded_at"
112 112 t.string "grader_comment"
113 113 t.datetime "created_at"
114 114 end
115 115
116 116 add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id"
117 117
118 118 create_table "users", :force => true do |t|
119 119 t.string "login", :limit => 10
120 120 t.string "full_name"
121 121 t.string "hashed_password"
122 122 t.string "salt", :limit => 5
123 123 t.string "alias"
124 124 t.string "email"
125 125 end
126 126
127 127 add_index "users", ["login"], :name => "index_users_on_login", :unique => true
128 128
129 129 end
You need to be logged in to leave comments. Login now