Description:
resize submissions.source field from "TEXT" to "MEDIUMTEXT"
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r712:04cb04cf3cfa - - 2 files changed: 29 inserted, 29 deleted
@@ -5,13 +5,13 | |||
|
5 | 5 | belongs_to :user |
|
6 | 6 | |
|
7 | 7 | before_validation :assign_problem |
|
8 | 8 | before_validation :assign_language |
|
9 | 9 | |
|
10 | 10 | validates_presence_of :source |
|
11 | - validates_length_of :source, :maximum => 100_000, :allow_blank => true, :message => 'too long' | |
|
11 | + validates_length_of :source, :maximum => 100_000, :allow_blank => true, :message => 'code too long, the limit is 100,000 bytes' | |
|
12 | 12 | validates_length_of :source, :minimum => 1, :allow_blank => true, :message => 'too short' |
|
13 | 13 | validate :must_have_valid_problem |
|
14 | 14 | validate :must_specify_language |
|
15 | 15 | |
|
16 | 16 | has_one :task |
|
17 | 17 |
@@ -8,22 +8,22 | |||
|
8 | 8 | # system, you should be using db:schema:load, not running all the migrations |
|
9 | 9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations |
|
10 | 10 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
|
11 | 11 | # |
|
12 | 12 | # It's strongly recommended that you check this file into your version control system. |
|
13 | 13 | |
|
14 |
- ActiveRecord::Schema.define(version: 201 |
|
|
14 | + ActiveRecord::Schema.define(version: 20180612102327) do | |
|
15 | 15 | |
|
16 | 16 | create_table "announcements", force: :cascade do |t| |
|
17 | 17 | t.string "author", limit: 255 |
|
18 |
- t.text "body", limit: |
|
|
18 | + t.text "body", limit: 65535 | |
|
19 | 19 | t.boolean "published" |
|
20 |
- t.datetime "created_at", |
|
|
21 |
- t.datetime "updated_at", |
|
|
22 |
- t.boolean "frontpage", |
|
|
23 |
- t.boolean "contest_only", |
|
|
20 | + t.datetime "created_at", null: false | |
|
21 | + t.datetime "updated_at", null: false | |
|
22 | + t.boolean "frontpage", default: false | |
|
23 | + t.boolean "contest_only", default: false | |
|
24 | 24 | t.string "title", limit: 255 |
|
25 | 25 | t.string "notes", limit: 255 |
|
26 | 26 | end |
|
27 | 27 | |
|
28 | 28 | create_table "contests", force: :cascade do |t| |
|
29 | 29 | t.string "title", limit: 255 |
@@ -47,25 +47,25 | |||
|
47 | 47 | t.string "name", limit: 255 |
|
48 | 48 | t.datetime "created_at", null: false |
|
49 | 49 | t.datetime "updated_at", null: false |
|
50 | 50 | end |
|
51 | 51 | |
|
52 | 52 | create_table "descriptions", force: :cascade do |t| |
|
53 |
- t.text "body", limit: |
|
|
53 | + t.text "body", limit: 65535 | |
|
54 | 54 | t.boolean "markdowned" |
|
55 |
- t.datetime "created_at", |
|
|
56 |
- t.datetime "updated_at", |
|
|
55 | + t.datetime "created_at", null: false | |
|
56 | + t.datetime "updated_at", null: false | |
|
57 | 57 | end |
|
58 | 58 | |
|
59 | 59 | create_table "grader_configurations", force: :cascade do |t| |
|
60 | 60 | t.string "key", limit: 255 |
|
61 | 61 | t.string "value_type", limit: 255 |
|
62 | 62 | t.string "value", limit: 255 |
|
63 |
- t.datetime "created_at", |
|
|
64 |
- t.datetime "updated_at", |
|
|
65 |
- t.text "description", limit: |
|
|
63 | + t.datetime "created_at", null: false | |
|
64 | + t.datetime "updated_at", null: false | |
|
65 | + t.text "description", limit: 65535 | |
|
66 | 66 | end |
|
67 | 67 | |
|
68 | 68 | create_table "grader_processes", force: :cascade do |t| |
|
69 | 69 | t.string "host", limit: 255 |
|
70 | 70 | t.integer "pid", limit: 4 |
|
71 | 71 | t.string "mode", limit: 255 |
@@ -123,16 +123,16 | |||
|
123 | 123 | end |
|
124 | 124 | |
|
125 | 125 | create_table "messages", force: :cascade do |t| |
|
126 | 126 | t.integer "sender_id", limit: 4 |
|
127 | 127 | t.integer "receiver_id", limit: 4 |
|
128 | 128 | t.integer "replying_message_id", limit: 4 |
|
129 |
- t.text "body", limit: |
|
|
129 | + t.text "body", limit: 65535 | |
|
130 | 130 | t.boolean "replied" |
|
131 |
- t.datetime "created_at", |
|
|
132 |
- t.datetime "updated_at", |
|
|
131 | + t.datetime "created_at", null: false | |
|
132 | + t.datetime "updated_at", null: false | |
|
133 | 133 | end |
|
134 | 134 | |
|
135 | 135 | create_table "problems", force: :cascade do |t| |
|
136 | 136 | t.string "name", limit: 30 |
|
137 | 137 | t.string "full_name", limit: 255 |
|
138 | 138 | t.integer "full_score", limit: 4 |
@@ -178,13 +178,13 | |||
|
178 | 178 | end |
|
179 | 179 | |
|
180 | 180 | add_index "roles_users", ["user_id"], name: "index_roles_users_on_user_id", using: :btree |
|
181 | 181 | |
|
182 | 182 | create_table "sessions", force: :cascade do |t| |
|
183 | 183 | t.string "session_id", limit: 255 |
|
184 |
- t.text "data", limit: |
|
|
184 | + t.text "data", limit: 65535 | |
|
185 | 185 | t.datetime "updated_at" |
|
186 | 186 | end |
|
187 | 187 | |
|
188 | 188 | add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree |
|
189 | 189 | add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree |
|
190 | 190 | |
@@ -210,16 +210,16 | |||
|
210 | 210 | t.integer "problem_id", limit: 4 |
|
211 | 211 | t.integer "language_id", limit: 4 |
|
212 | 212 | t.text "source", limit: 16777215 |
|
213 | 213 | t.binary "binary", limit: 65535 |
|
214 | 214 | t.datetime "submitted_at" |
|
215 | 215 | t.datetime "compiled_at" |
|
216 |
- t.text "compiler_message", limit: |
|
|
216 | + t.text "compiler_message", limit: 65535 | |
|
217 | 217 | t.datetime "graded_at" |
|
218 | 218 | t.integer "points", limit: 4 |
|
219 |
- t.text "grader_comment", limit: |
|
|
219 | + t.text "grader_comment", limit: 65535 | |
|
220 | 220 | t.integer "number", limit: 4 |
|
221 | 221 | t.string "source_filename", limit: 255 |
|
222 | 222 | t.float "max_runtime", limit: 24 |
|
223 | 223 | t.integer "peak_memory", limit: 4 |
|
224 | 224 | t.integer "effective_code_length", limit: 4 |
|
225 | 225 | t.string "ip_address", limit: 255 |
@@ -244,33 +244,33 | |||
|
244 | 244 | end |
|
245 | 245 | |
|
246 | 246 | add_index "tasks", ["submission_id"], name: "index_tasks_on_submission_id", using: :btree |
|
247 | 247 | |
|
248 | 248 | create_table "test_pairs", force: :cascade do |t| |
|
249 | 249 | t.integer "problem_id", limit: 4 |
|
250 |
- t.text "input", limit: |
|
|
251 |
- t.text "solution", limit: |
|
|
252 |
- t.datetime "created_at", |
|
|
253 |
- t.datetime "updated_at", |
|
|
250 | + t.text "input", limit: 16777215 | |
|
251 | + t.text "solution", limit: 16777215 | |
|
252 | + t.datetime "created_at", null: false | |
|
253 | + t.datetime "updated_at", null: false | |
|
254 | 254 | end |
|
255 | 255 | |
|
256 | 256 | create_table "test_requests", force: :cascade do |t| |
|
257 | 257 | t.integer "user_id", limit: 4 |
|
258 | 258 | t.integer "problem_id", limit: 4 |
|
259 | 259 | t.integer "submission_id", limit: 4 |
|
260 | 260 | t.string "input_file_name", limit: 255 |
|
261 | 261 | t.string "output_file_name", limit: 255 |
|
262 | 262 | t.string "running_stat", limit: 255 |
|
263 | 263 | t.integer "status", limit: 4 |
|
264 |
- t.datetime "updated_at", |
|
|
264 | + t.datetime "updated_at", null: false | |
|
265 | 265 | t.datetime "submitted_at" |
|
266 | 266 | t.datetime "compiled_at" |
|
267 |
- t.text "compiler_message", limit: |
|
|
267 | + t.text "compiler_message", limit: 65535 | |
|
268 | 268 | t.datetime "graded_at" |
|
269 | 269 | t.string "grader_comment", limit: 255 |
|
270 |
- t.datetime "created_at", |
|
|
270 | + t.datetime "created_at", null: false | |
|
271 | 271 | t.float "running_time", limit: 24 |
|
272 | 272 | t.string "exit_status", limit: 255 |
|
273 | 273 | t.integer "memory_usage", limit: 4 |
|
274 | 274 | end |
|
275 | 275 | |
|
276 | 276 | add_index "test_requests", ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id", using: :btree |
@@ -279,14 +279,14 | |||
|
279 | 279 | t.integer "problem_id", limit: 4 |
|
280 | 280 | t.integer "num", limit: 4 |
|
281 | 281 | t.integer "group", limit: 4 |
|
282 | 282 | t.integer "score", limit: 4 |
|
283 | 283 | t.text "input", limit: 4294967295 |
|
284 | 284 | t.text "sol", limit: 4294967295 |
|
285 |
- t.datetime "created_at" |
|
|
286 |
- t.datetime "updated_at" |
|
|
285 | + t.datetime "created_at" | |
|
286 | + t.datetime "updated_at" | |
|
287 | 287 | end |
|
288 | 288 | |
|
289 | 289 | add_index "testcases", ["problem_id"], name: "index_testcases_on_problem_id", using: :btree |
|
290 | 290 | |
|
291 | 291 | create_table "user_contest_stats", force: :cascade do |t| |
|
292 | 292 | t.integer "user_id", limit: 4 |
@@ -305,16 +305,16 | |||
|
305 | 305 | t.string "email", limit: 255 |
|
306 | 306 | t.integer "site_id", limit: 4 |
|
307 | 307 | t.integer "country_id", limit: 4 |
|
308 | 308 | t.boolean "activated", default: false |
|
309 | 309 | t.datetime "created_at" |
|
310 | 310 | t.datetime "updated_at" |
|
311 | - t.string "section", limit: 255 | |
|
312 | 311 | t.boolean "enabled", default: true |
|
313 | 312 | t.string "remark", limit: 255 |
|
314 | 313 | t.string "last_ip", limit: 255 |
|
314 | + t.string "section", limit: 255 | |
|
315 | 315 | end |
|
316 | 316 | |
|
317 | 317 | add_index "users", ["login"], name: "index_users_on_login", unique: true, using: :btree |
|
318 | 318 | |
|
319 | 319 | add_foreign_key "problems_tags", "problems" |
|
320 | 320 | add_foreign_key "problems_tags", "tags" |
You need to be logged in to leave comments.
Login now