Description:
update schema
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r640:6287684fa8d9 - - 1 file changed: 148 inserted, 137 deleted

@@ -14,257 +14,268
14 ActiveRecord::Schema.define(version: 20170124024527) do
14 ActiveRecord::Schema.define(version: 20170124024527) do
15
15
16 create_table "announcements", force: :cascade do |t|
16 create_table "announcements", force: :cascade do |t|
17 - t.string "author"
17 + t.string "author", limit: 255
18 - t.text "body"
18 + t.text "body", limit: 16777215
19 t.boolean "published"
19 t.boolean "published"
20 - t.datetime "created_at", null: false
20 + t.datetime "created_at", null: false
21 - t.datetime "updated_at", null: false
21 + t.datetime "updated_at", null: false
22 - t.boolean "frontpage", default: false
22 + t.boolean "frontpage", default: false
23 - t.boolean "contest_only", default: false
23 + t.boolean "contest_only", default: false
24 - t.string "title"
24 + t.string "title", limit: 255
25 - t.string "notes"
25 + t.string "notes", limit: 255
26 end
26 end
27
27
28 create_table "contests", force: :cascade do |t|
28 create_table "contests", force: :cascade do |t|
29 - t.string "title"
29 + t.string "title", limit: 255
30 t.boolean "enabled"
30 t.boolean "enabled"
31 - t.datetime "created_at", null: false
31 + t.datetime "created_at", null: false
32 - t.datetime "updated_at", null: false
32 + t.datetime "updated_at", null: false
33 - t.string "name"
33 + t.string "name", limit: 255
34 end
34 end
35
35
36 create_table "contests_problems", id: false, force: :cascade do |t|
36 create_table "contests_problems", id: false, force: :cascade do |t|
37 - t.integer "contest_id"
37 + t.integer "contest_id", limit: 4
38 - t.integer "problem_id"
38 + t.integer "problem_id", limit: 4
39 end
39 end
40
40
41 create_table "contests_users", id: false, force: :cascade do |t|
41 create_table "contests_users", id: false, force: :cascade do |t|
42 - t.integer "contest_id"
42 + t.integer "contest_id", limit: 4
43 - t.integer "user_id"
43 + t.integer "user_id", limit: 4
44 end
44 end
45
45
46 create_table "countries", force: :cascade do |t|
46 create_table "countries", force: :cascade do |t|
47 - t.string "name"
47 + t.string "name", limit: 255
48 - t.datetime "created_at", null: false
48 + t.datetime "created_at", null: false
49 - t.datetime "updated_at", null: false
49 + t.datetime "updated_at", null: false
50 end
50 end
51
51
52 create_table "descriptions", force: :cascade do |t|
52 create_table "descriptions", force: :cascade do |t|
53 - t.text "body"
53 + t.text "body", limit: 16777215
54 t.boolean "markdowned"
54 t.boolean "markdowned"
55 - t.datetime "created_at", null: false
55 + t.datetime "created_at", null: false
56 - t.datetime "updated_at", null: false
56 + t.datetime "updated_at", null: false
57 end
57 end
58
58
59 create_table "grader_configurations", force: :cascade do |t|
59 create_table "grader_configurations", force: :cascade do |t|
60 - t.string "key"
60 + t.string "key", limit: 255
61 - t.string "value_type"
61 + t.string "value_type", limit: 255
62 - t.string "value"
62 + t.string "value", limit: 255
63 - t.datetime "created_at", null: false
63 + t.datetime "created_at", null: false
64 - t.datetime "updated_at", null: false
64 + t.datetime "updated_at", null: false
65 - t.text "description"
65 + t.text "description", limit: 16777215
66 end
66 end
67
67
68 create_table "grader_processes", force: :cascade do |t|
68 create_table "grader_processes", force: :cascade do |t|
69 - t.string "host"
69 + t.string "host", limit: 255
70 - t.integer "pid"
70 + t.integer "pid", limit: 4
71 - t.string "mode"
71 + t.string "mode", limit: 255
72 t.boolean "active"
72 t.boolean "active"
73 - t.datetime "created_at", null: false
73 + t.datetime "created_at", null: false
74 - t.datetime "updated_at", null: false
74 + t.datetime "updated_at", null: false
75 - t.integer "task_id"
75 + t.integer "task_id", limit: 4
76 - t.string "task_type"
76 + t.string "task_type", limit: 255
77 t.boolean "terminated"
77 t.boolean "terminated"
78 end
78 end
79
79
80 - add_index "grader_processes", ["host", "pid"], name: "index_grader_processes_on_ip_and_pid"
80 + add_index "grader_processes", ["host", "pid"], name: "index_grader_processes_on_ip_and_pid", using: :btree
81
81
82 create_table "heart_beats", force: :cascade do |t|
82 create_table "heart_beats", force: :cascade do |t|
83 - t.integer "user_id"
83 + t.integer "user_id", limit: 4
84 - t.string "ip_address"
84 + t.string "ip_address", limit: 255
85 - t.datetime "created_at", null: false
85 + t.datetime "created_at", null: false
86 - t.datetime "updated_at", null: false
86 + t.datetime "updated_at", null: false
87 - t.string "status"
87 + t.string "status", limit: 255
88 end
88 end
89
89
90 - add_index "heart_beats", ["updated_at"], name: "index_heart_beats_on_updated_at"
90 + add_index "heart_beats", ["updated_at"], name: "index_heart_beats_on_updated_at", using: :btree
91
91
92 create_table "languages", force: :cascade do |t|
92 create_table "languages", force: :cascade do |t|
93 t.string "name", limit: 10
93 t.string "name", limit: 10
94 - t.string "pretty_name"
94 + t.string "pretty_name", limit: 255
95 t.string "ext", limit: 10
95 t.string "ext", limit: 10
96 - t.string "common_ext"
96 + t.string "common_ext", limit: 255
97 end
97 end
98
98
99 create_table "logins", force: :cascade do |t|
99 create_table "logins", force: :cascade do |t|
100 - t.integer "user_id"
100 + t.integer "user_id", limit: 4
101 - t.string "ip_address"
101 + t.string "ip_address", limit: 255
102 - t.datetime "created_at", null: false
102 + t.datetime "created_at", null: false
103 - t.datetime "updated_at", null: false
103 + t.datetime "updated_at", null: false
104 end
104 end
105
105
106 create_table "messages", force: :cascade do |t|
106 create_table "messages", force: :cascade do |t|
107 - t.integer "sender_id"
107 + t.integer "sender_id", limit: 4
108 - t.integer "receiver_id"
108 + t.integer "receiver_id", limit: 4
109 - t.integer "replying_message_id"
109 + t.integer "replying_message_id", limit: 4
110 - t.text "body"
110 + t.text "body", limit: 16777215
111 t.boolean "replied"
111 t.boolean "replied"
112 - t.datetime "created_at", null: false
112 + t.datetime "created_at", null: false
113 - t.datetime "updated_at", null: false
113 + t.datetime "updated_at", null: false
114 end
114 end
115
115
116 - # Could not dump table "problems" because of following NoMethodError
116 + create_table "problems", force: :cascade do |t|
117 - # undefined method `[]' for nil:NilClass
117 + t.string "name", limit: 30
118 + t.string "full_name", limit: 255
119 + t.integer "full_score", limit: 4
120 + t.date "date_added"
121 + t.boolean "available"
122 + t.string "url", limit: 255
123 + t.integer "description_id", limit: 4
124 + t.boolean "test_allowed"
125 + t.boolean "output_only"
126 + t.string "description_filename", limit: 255
127 + t.boolean "view_testcase"
128 + end
118
129
119 create_table "rights", force: :cascade do |t|
130 create_table "rights", force: :cascade do |t|
120 - t.string "name"
131 + t.string "name", limit: 255
121 - t.string "controller"
132 + t.string "controller", limit: 255
122 - t.string "action"
133 + t.string "action", limit: 255
123 end
134 end
124
135
125 create_table "rights_roles", id: false, force: :cascade do |t|
136 create_table "rights_roles", id: false, force: :cascade do |t|
126 - t.integer "right_id"
137 + t.integer "right_id", limit: 4
127 - t.integer "role_id"
138 + t.integer "role_id", limit: 4
128 end
139 end
129
140
130 - add_index "rights_roles", ["role_id"], name: "index_rights_roles_on_role_id"
141 + add_index "rights_roles", ["role_id"], name: "index_rights_roles_on_role_id", using: :btree
131
142
132 create_table "roles", force: :cascade do |t|
143 create_table "roles", force: :cascade do |t|
133 - t.string "name"
144 + t.string "name", limit: 255
134 end
145 end
135
146
136 create_table "roles_users", id: false, force: :cascade do |t|
147 create_table "roles_users", id: false, force: :cascade do |t|
137 - t.integer "role_id"
148 + t.integer "role_id", limit: 4
138 - t.integer "user_id"
149 + t.integer "user_id", limit: 4
139 end
150 end
140
151
141 - add_index "roles_users", ["user_id"], name: "index_roles_users_on_user_id"
152 + add_index "roles_users", ["user_id"], name: "index_roles_users_on_user_id", using: :btree
142
153
143 create_table "sessions", force: :cascade do |t|
154 create_table "sessions", force: :cascade do |t|
144 - t.string "session_id"
155 + t.string "session_id", limit: 255
145 - t.text "data"
156 + t.text "data", limit: 16777215
146 t.datetime "updated_at"
157 t.datetime "updated_at"
147 end
158 end
148
159
149 - add_index "sessions", ["session_id"], name: "index_sessions_on_session_id"
160 + add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree
150 - add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at"
161 + add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree
151
162
152 create_table "sites", force: :cascade do |t|
163 create_table "sites", force: :cascade do |t|
153 - t.string "name"
164 + t.string "name", limit: 255
154 t.boolean "started"
165 t.boolean "started"
155 t.datetime "start_time"
166 t.datetime "start_time"
156 - t.datetime "created_at", null: false
167 + t.datetime "created_at", null: false
157 - t.datetime "updated_at", null: false
168 + t.datetime "updated_at", null: false
158 - t.integer "country_id"
169 + t.integer "country_id", limit: 4
159 - t.string "password"
170 + t.string "password", limit: 255
160 end
171 end
161
172
162 create_table "submission_view_logs", force: :cascade do |t|
173 create_table "submission_view_logs", force: :cascade do |t|
163 - t.integer "user_id"
174 + t.integer "user_id", limit: 4
164 - t.integer "submission_id"
175 + t.integer "submission_id", limit: 4
165 - t.datetime "created_at", null: false
176 + t.datetime "created_at", null: false
166 - t.datetime "updated_at", null: false
177 + t.datetime "updated_at", null: false
167 end
178 end
168
179
169 create_table "submissions", force: :cascade do |t|
180 create_table "submissions", force: :cascade do |t|
170 - t.integer "user_id"
181 + t.integer "user_id", limit: 4
171 - t.integer "problem_id"
182 + t.integer "problem_id", limit: 4
172 - t.integer "language_id"
183 + t.integer "language_id", limit: 4
173 - t.text "source"
184 + t.text "source", limit: 16777215
174 - t.binary "binary"
185 + t.binary "binary", limit: 65535
175 t.datetime "submitted_at"
186 t.datetime "submitted_at"
176 t.datetime "compiled_at"
187 t.datetime "compiled_at"
177 - t.text "compiler_message"
188 + t.text "compiler_message", limit: 16777215
178 t.datetime "graded_at"
189 t.datetime "graded_at"
179 - t.integer "points"
190 + t.integer "points", limit: 4
180 - t.text "grader_comment"
191 + t.text "grader_comment", limit: 16777215
181 - t.integer "number"
192 + t.integer "number", limit: 4
182 - t.string "source_filename"
193 + t.string "source_filename", limit: 255
183 - t.float "max_runtime"
194 + t.float "max_runtime", limit: 24
184 - t.integer "peak_memory"
195 + t.integer "peak_memory", limit: 4
185 - t.integer "effective_code_length"
196 + t.integer "effective_code_length", limit: 4
186 - t.string "ip_address"
197 + t.string "ip_address", limit: 255
187 end
198 end
188
199
189 - add_index "submissions", ["user_id", "problem_id", "number"], name: "index_submissions_on_user_id_and_problem_id_and_number", unique: true
200 + add_index "submissions", ["user_id", "problem_id", "number"], name: "index_submissions_on_user_id_and_problem_id_and_number", unique: true, using: :btree
190 - add_index "submissions", ["user_id", "problem_id"], name: "index_submissions_on_user_id_and_problem_id"
201 + add_index "submissions", ["user_id", "problem_id"], name: "index_submissions_on_user_id_and_problem_id", using: :btree
191
202
192 create_table "tasks", force: :cascade do |t|
203 create_table "tasks", force: :cascade do |t|
193 - t.integer "submission_id"
204 + t.integer "submission_id", limit: 4
194 t.datetime "created_at"
205 t.datetime "created_at"
195 - t.integer "status"
206 + t.integer "status", limit: 4
196 t.datetime "updated_at"
207 t.datetime "updated_at"
197 end
208 end
198
209
199 create_table "test_pairs", force: :cascade do |t|
210 create_table "test_pairs", force: :cascade do |t|
200 - t.integer "problem_id"
211 + t.integer "problem_id", limit: 4
201 - t.text "input", limit: 16777215
212 + t.text "input", limit: 4294967295
202 - t.text "solution", limit: 16777215
213 + t.text "solution", limit: 4294967295
203 - t.datetime "created_at", null: false
214 + t.datetime "created_at", null: false
204 - t.datetime "updated_at", null: false
215 + t.datetime "updated_at", null: false
205 end
216 end
206
217
207 create_table "test_requests", force: :cascade do |t|
218 create_table "test_requests", force: :cascade do |t|
208 - t.integer "user_id"
219 + t.integer "user_id", limit: 4
209 - t.integer "problem_id"
220 + t.integer "problem_id", limit: 4
210 - t.integer "submission_id"
221 + t.integer "submission_id", limit: 4
211 - t.string "input_file_name"
222 + t.string "input_file_name", limit: 255
212 - t.string "output_file_name"
223 + t.string "output_file_name", limit: 255
213 - t.string "running_stat"
224 + t.string "running_stat", limit: 255
214 - t.integer "status"
225 + t.integer "status", limit: 4
215 - t.datetime "updated_at", null: false
226 + t.datetime "updated_at", null: false
216 t.datetime "submitted_at"
227 t.datetime "submitted_at"
217 t.datetime "compiled_at"
228 t.datetime "compiled_at"
218 - t.text "compiler_message"
229 + t.text "compiler_message", limit: 16777215
219 t.datetime "graded_at"
230 t.datetime "graded_at"
220 - t.string "grader_comment"
231 + t.string "grader_comment", limit: 255
221 - t.datetime "created_at", null: false
232 + t.datetime "created_at", null: false
222 - t.float "running_time"
233 + t.float "running_time", limit: 24
223 - t.string "exit_status"
234 + t.string "exit_status", limit: 255
224 - t.integer "memory_usage"
235 + t.integer "memory_usage", limit: 4
225 end
236 end
226
237
227 - add_index "test_requests", ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id"
238 + add_index "test_requests", ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id", using: :btree
228
239
229 create_table "testcases", force: :cascade do |t|
240 create_table "testcases", force: :cascade do |t|
230 - t.integer "problem_id"
241 + t.integer "problem_id", limit: 4
231 - t.integer "num"
242 + t.integer "num", limit: 4
232 - t.integer "group"
243 + t.integer "group", limit: 4
233 - t.integer "score"
244 + t.integer "score", limit: 4
234 t.text "input", limit: 4294967295
245 t.text "input", limit: 4294967295
235 t.text "sol", limit: 4294967295
246 t.text "sol", limit: 4294967295
236 t.datetime "created_at", null: false
247 t.datetime "created_at", null: false
237 t.datetime "updated_at", null: false
248 t.datetime "updated_at", null: false
238 end
249 end
239
250
240 - add_index "testcases", ["problem_id"], name: "index_testcases_on_problem_id"
251 + add_index "testcases", ["problem_id"], name: "index_testcases_on_problem_id", using: :btree
241
252
242 create_table "user_contest_stats", force: :cascade do |t|
253 create_table "user_contest_stats", force: :cascade do |t|
243 - t.integer "user_id"
254 + t.integer "user_id", limit: 4
244 t.datetime "started_at"
255 t.datetime "started_at"
245 - t.datetime "created_at", null: false
256 + t.datetime "created_at", null: false
246 - t.datetime "updated_at", null: false
257 + t.datetime "updated_at", null: false
247 t.boolean "forced_logout"
258 t.boolean "forced_logout"
248 end
259 end
249
260
250 create_table "users", force: :cascade do |t|
261 create_table "users", force: :cascade do |t|
251 t.string "login", limit: 50
262 t.string "login", limit: 50
252 - t.string "full_name"
263 + t.string "full_name", limit: 255
253 - t.string "hashed_password"
264 + t.string "hashed_password", limit: 255
254 t.string "salt", limit: 5
265 t.string "salt", limit: 5
255 - t.string "alias"
266 + t.string "alias", limit: 255
256 - t.string "email"
267 + t.string "email", limit: 255
257 - t.integer "site_id"
268 + t.integer "site_id", limit: 4
258 - t.integer "country_id"
269 + t.integer "country_id", limit: 4
259 - t.boolean "activated", default: false
270 + t.boolean "activated", default: false
260 t.datetime "created_at"
271 t.datetime "created_at"
261 t.datetime "updated_at"
272 t.datetime "updated_at"
262 - t.boolean "enabled", default: true
273 + t.string "section", limit: 255
263 - t.string "remark"
274 + t.boolean "enabled", default: true
264 - t.string "last_ip"
275 + t.string "remark", limit: 255
265 - t.string "section"
276 + t.string "last_ip", limit: 255
266 end
277 end
267
278
268 - add_index "users", ["login"], name: "index_users_on_login", unique: true
279 + add_index "users", ["login"], name: "index_users_on_login", unique: true, using: :btree
269
280
270 end
281 end
You need to be logged in to leave comments. Login now