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

r796:d1494dbef0e7 - - 3 files changed: 70 inserted, 71 deleted

@@ -74,27 +74,24
74 bootstrap3-datetimepicker-rails (4.17.47)
74 bootstrap3-datetimepicker-rails (4.17.47)
75 momentjs-rails (>= 2.8.1)
75 momentjs-rails (>= 2.8.1)
76 builder (3.2.3)
76 builder (3.2.3)
77 byebug (11.0.1)
77 byebug (11.0.1)
78 capybara (3.25.0)
78 capybara (3.25.0)
79 addressable
79 addressable
80 mini_mime (>= 0.1.3)
80 mini_mime (>= 0.1.3)
81 nokogiri (~> 1.8)
81 nokogiri (~> 1.8)
82 rack (>= 1.6.0)
82 rack (>= 1.6.0)
83 rack-test (>= 0.6.3)
83 rack-test (>= 0.6.3)
84 regexp_parser (~> 1.5)
84 regexp_parser (~> 1.5)
85 xpath (~> 3.2)
85 xpath (~> 3.2)
86 - capybara-console (0.0.4)
87 - capybara
88 - rails (>= 3.0)
89 childprocess (1.0.1)
86 childprocess (1.0.1)
90 rake (< 13.0)
87 rake (< 13.0)
91 coffee-rails (4.2.2)
88 coffee-rails (4.2.2)
92 coffee-script (>= 2.2.0)
89 coffee-script (>= 2.2.0)
93 railties (>= 4.0.0)
90 railties (>= 4.0.0)
94 coffee-script (2.4.1)
91 coffee-script (2.4.1)
95 coffee-script-source
92 coffee-script-source
96 execjs
93 execjs
97 coffee-script-source (1.12.2)
94 coffee-script-source (1.12.2)
98 concurrent-ruby (1.1.5)
95 concurrent-ruby (1.1.5)
99 crass (1.0.4)
96 crass (1.0.4)
100 dynamic_form (1.1.4)
97 dynamic_form (1.1.4)
@@ -290,25 +287,24
290 ace-rails-ap
287 ace-rails-ap
291 activerecord-session_store
288 activerecord-session_store
292 autoprefixer-rails
289 autoprefixer-rails
293 best_in_place (~> 3.0.1)
290 best_in_place (~> 3.0.1)
294 bootsnap (>= 1.1.0)
291 bootsnap (>= 1.1.0)
295 bootstrap-datepicker-rails
292 bootstrap-datepicker-rails
296 bootstrap-sass (~> 3.4.1)
293 bootstrap-sass (~> 3.4.1)
297 bootstrap-switch-rails
294 bootstrap-switch-rails
298 bootstrap-toggle-rails
295 bootstrap-toggle-rails
299 bootstrap3-datetimepicker-rails
296 bootstrap3-datetimepicker-rails
300 byebug
297 byebug
301 capybara (>= 2.15)
298 capybara (>= 2.15)
302 - capybara-console
303 coffee-rails
299 coffee-rails
304 dynamic_form
300 dynamic_form
305 fuzzy-string-match
301 fuzzy-string-match
306 haml
302 haml
307 haml-rails
303 haml-rails
308 in_place_editing
304 in_place_editing
309 jbuilder (~> 2.5)
305 jbuilder (~> 2.5)
310 jquery-countdown-rails
306 jquery-countdown-rails
311 jquery-datatables-rails
307 jquery-datatables-rails
312 jquery-rails
308 jquery-rails
313 jquery-tablesorter
309 jquery-tablesorter
314 jquery-timepicker-addon-rails
310 jquery-timepicker-addon-rails
@@ -143,25 +143,26
143 return true if user==nil || user.site == nil
143 return true if user==nil || user.site == nil
144 if user.contest_finished?
144 if user.contest_finished?
145 flash[:notice] = 'Error: the contest you are participating is over.'
145 flash[:notice] = 'Error: the contest you are participating is over.'
146 redirect_to :back
146 redirect_to :back
147 return false
147 return false
148 end
148 end
149 return true
149 return true
150 end
150 end
151
151
152 def is_request_ip_allowed?
152 def is_request_ip_allowed?
153 unless GraderConfiguration[WHITELIST_IGNORE_CONF_KEY]
153 unless GraderConfiguration[WHITELIST_IGNORE_CONF_KEY]
154 user_ip = IPAddr.new(request.remote_ip)
154 user_ip = IPAddr.new(request.remote_ip)
155 + allowed = GraderConfiguration[WHITELIST_IP_CONF_KEY] || ''
155
156
156 - GraderConfiguration[WHITELIST_IP_CONF_KEY].delete(' ').split(',').each do |ips|
157 + allowed.delete(' ').split(',').each do |ips|
157 allow_ips = IPAddr.new(ips)
158 allow_ips = IPAddr.new(ips)
158 if allow_ips.include?(user_ip)
159 if allow_ips.include?(user_ip)
159 return true
160 return true
160 end
161 end
161 end
162 end
162 return false
163 return false
163 end
164 end
164 return true
165 return true
165 end
166 end
166
167
167 end
168 end
@@ -3,297 +3,299
3 # incrementally modify your database, and then regenerate this schema definition.
3 # incrementally modify your database, and then regenerate this schema definition.
4 #
4 #
5 # Note that this schema.rb definition is the authoritative source for your
5 # Note that this schema.rb definition is the authoritative source for your
6 # database schema. If you need to create the application database on another
6 # database schema. If you need to create the application database on another
7 # system, you should be using db:schema:load, not running all the migrations
7 # system, you should be using db:schema:load, not running all the migrations
8 # from scratch. The latter is a flawed and unsustainable approach (the more migrations
8 # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9 # you'll amass, the slower it'll run and the greater likelihood for issues).
9 # you'll amass, the slower it'll run and the greater likelihood for issues).
10 #
10 #
11 # It's strongly recommended that you check this file into your version control system.
11 # It's strongly recommended that you check this file into your version control system.
12
12
13 ActiveRecord::Schema.define(version: 2020_08_13_083020) do
13 ActiveRecord::Schema.define(version: 2020_08_13_083020) do
14
14
15 - create_table "announcements", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
15 + create_table "announcements", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
16 t.string "author"
16 t.string "author"
17 - t.text "body"
17 + t.text "body", limit: 16777215
18 t.boolean "published"
18 t.boolean "published"
19 - t.datetime "created_at"
19 + t.datetime "created_at", null: false
20 - t.datetime "updated_at"
20 + t.datetime "updated_at", null: false
21 t.boolean "frontpage", default: false
21 t.boolean "frontpage", default: false
22 t.boolean "contest_only", default: false
22 t.boolean "contest_only", default: false
23 t.string "title"
23 t.string "title"
24 t.string "notes"
24 t.string "notes"
25 end
25 end
26
26
27 - create_table "contests", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
27 + create_table "contests", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
28 t.string "title"
28 t.string "title"
29 t.boolean "enabled"
29 t.boolean "enabled"
30 - t.datetime "created_at"
30 + t.datetime "created_at", null: false
31 - t.datetime "updated_at"
31 + t.datetime "updated_at", null: false
32 t.string "name"
32 t.string "name"
33 end
33 end
34
34
35 - create_table "contests_problems", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
35 + create_table "contests_problems", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
36 t.integer "contest_id"
36 t.integer "contest_id"
37 t.integer "problem_id"
37 t.integer "problem_id"
38 end
38 end
39
39
40 - create_table "contests_users", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
40 + create_table "contests_users", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
41 t.integer "contest_id"
41 t.integer "contest_id"
42 t.integer "user_id"
42 t.integer "user_id"
43 end
43 end
44
44
45 - create_table "countries", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
45 + create_table "countries", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
46 t.string "name"
46 t.string "name"
47 - t.datetime "created_at"
47 + t.datetime "created_at", null: false
48 - t.datetime "updated_at"
48 + t.datetime "updated_at", null: false
49 end
49 end
50
50
51 - create_table "descriptions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
51 + create_table "descriptions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
52 - t.text "body"
52 + t.text "body", limit: 16777215
53 t.boolean "markdowned"
53 t.boolean "markdowned"
54 - t.datetime "created_at"
54 + t.datetime "created_at", null: false
55 - t.datetime "updated_at"
55 + t.datetime "updated_at", null: false
56 end
56 end
57
57
58 - create_table "grader_configurations", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
58 + create_table "grader_configurations", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
59 t.string "key"
59 t.string "key"
60 t.string "value_type"
60 t.string "value_type"
61 t.string "value"
61 t.string "value"
62 - t.datetime "created_at"
62 + t.datetime "created_at", null: false
63 - t.datetime "updated_at"
63 + t.datetime "updated_at", null: false
64 - t.text "description"
64 + t.text "description", limit: 16777215
65 end
65 end
66
66
67 - create_table "grader_processes", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
67 + create_table "grader_processes", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
68 t.string "host"
68 t.string "host"
69 t.integer "pid"
69 t.integer "pid"
70 t.string "mode"
70 t.string "mode"
71 t.boolean "active"
71 t.boolean "active"
72 - t.datetime "created_at"
72 + t.datetime "created_at", null: false
73 - t.datetime "updated_at"
73 + t.datetime "updated_at", null: false
74 t.integer "task_id"
74 t.integer "task_id"
75 t.string "task_type"
75 t.string "task_type"
76 t.boolean "terminated"
76 t.boolean "terminated"
77 - t.index ["host", "pid"], name: "index_grader_processes_on_host_and_pid"
77 + t.index ["host", "pid"], name: "index_grader_processes_on_ip_and_pid"
78 end
78 end
79
79
80 create_table "groups", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
80 create_table "groups", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
81 t.string "name"
81 t.string "name"
82 t.string "description"
82 t.string "description"
83 t.boolean "enabled", default: true
83 t.boolean "enabled", default: true
84 end
84 end
85
85
86 create_table "groups_problems", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
86 create_table "groups_problems", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
87 t.integer "problem_id", null: false
87 t.integer "problem_id", null: false
88 t.integer "group_id", null: false
88 t.integer "group_id", null: false
89 t.index ["group_id", "problem_id"], name: "index_groups_problems_on_group_id_and_problem_id"
89 t.index ["group_id", "problem_id"], name: "index_groups_problems_on_group_id_and_problem_id"
90 end
90 end
91
91
92 - create_table "groups_users", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
92 + create_table "groups_users", options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
93 t.integer "group_id", null: false
93 t.integer "group_id", null: false
94 t.integer "user_id", null: false
94 t.integer "user_id", null: false
95 t.index ["user_id", "group_id"], name: "index_groups_users_on_user_id_and_group_id"
95 t.index ["user_id", "group_id"], name: "index_groups_users_on_user_id_and_group_id"
96 end
96 end
97
97
98 create_table "heart_beats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
98 create_table "heart_beats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
99 t.integer "user_id"
99 t.integer "user_id"
100 t.string "ip_address"
100 t.string "ip_address"
101 - t.datetime "created_at"
101 + t.datetime "created_at", null: false
102 - t.datetime "updated_at"
102 + t.datetime "updated_at", null: false
103 t.string "status"
103 t.string "status"
104 t.index ["updated_at"], name: "index_heart_beats_on_updated_at"
104 t.index ["updated_at"], name: "index_heart_beats_on_updated_at"
105 end
105 end
106
106
107 - create_table "languages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
107 + create_table "languages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
108 t.string "name", limit: 10
108 t.string "name", limit: 10
109 t.string "pretty_name"
109 t.string "pretty_name"
110 t.string "ext", limit: 10
110 t.string "ext", limit: 10
111 t.string "common_ext"
111 t.string "common_ext"
112 end
112 end
113
113
114 create_table "logins", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
114 create_table "logins", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
115 t.integer "user_id"
115 t.integer "user_id"
116 t.string "ip_address"
116 t.string "ip_address"
117 - t.datetime "created_at"
117 + t.datetime "created_at", null: false
118 - t.datetime "updated_at"
118 + t.datetime "updated_at", null: false
119 + t.index ["user_id"], name: "index_logins_on_user_id"
119 end
120 end
120
121
121 - create_table "messages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
122 + create_table "messages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
122 t.integer "sender_id"
123 t.integer "sender_id"
123 t.integer "receiver_id"
124 t.integer "receiver_id"
124 t.integer "replying_message_id"
125 t.integer "replying_message_id"
125 - t.text "body"
126 + t.text "body", limit: 16777215
126 t.boolean "replied"
127 t.boolean "replied"
127 - t.datetime "created_at"
128 + t.datetime "created_at", null: false
128 - t.datetime "updated_at"
129 + t.datetime "updated_at", null: false
129 end
130 end
130
131
131 - create_table "problems", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
132 + create_table "problems", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
132 - t.string "name", limit: 30
133 + t.string "name", limit: 100
133 t.string "full_name"
134 t.string "full_name"
134 t.integer "full_score"
135 t.integer "full_score"
135 t.date "date_added"
136 t.date "date_added"
136 t.boolean "available"
137 t.boolean "available"
137 t.string "url"
138 t.string "url"
138 t.integer "description_id"
139 t.integer "description_id"
139 t.boolean "test_allowed"
140 t.boolean "test_allowed"
140 t.boolean "output_only"
141 t.boolean "output_only"
141 t.string "description_filename"
142 t.string "description_filename"
142 t.boolean "view_testcase"
143 t.boolean "view_testcase"
143 end
144 end
144
145
145 create_table "problems_tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
146 create_table "problems_tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
146 t.integer "problem_id"
147 t.integer "problem_id"
147 t.integer "tag_id"
148 t.integer "tag_id"
148 t.index ["problem_id", "tag_id"], name: "index_problems_tags_on_problem_id_and_tag_id", unique: true
149 t.index ["problem_id", "tag_id"], name: "index_problems_tags_on_problem_id_and_tag_id", unique: true
149 t.index ["problem_id"], name: "index_problems_tags_on_problem_id"
150 t.index ["problem_id"], name: "index_problems_tags_on_problem_id"
150 t.index ["tag_id"], name: "index_problems_tags_on_tag_id"
151 t.index ["tag_id"], name: "index_problems_tags_on_tag_id"
151 end
152 end
152
153
153 - create_table "rights", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
154 + create_table "rights", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
154 t.string "name"
155 t.string "name"
155 t.string "controller"
156 t.string "controller"
156 t.string "action"
157 t.string "action"
157 end
158 end
158
159
159 - create_table "rights_roles", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
160 + create_table "rights_roles", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
160 t.integer "right_id"
161 t.integer "right_id"
161 t.integer "role_id"
162 t.integer "role_id"
162 t.index ["role_id"], name: "index_rights_roles_on_role_id"
163 t.index ["role_id"], name: "index_rights_roles_on_role_id"
163 end
164 end
164
165
165 - create_table "roles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
166 + create_table "roles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
166 t.string "name"
167 t.string "name"
167 end
168 end
168
169
169 - create_table "roles_users", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
170 + create_table "roles_users", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
170 t.integer "role_id"
171 t.integer "role_id"
171 t.integer "user_id"
172 t.integer "user_id"
172 t.index ["user_id"], name: "index_roles_users_on_user_id"
173 t.index ["user_id"], name: "index_roles_users_on_user_id"
173 end
174 end
174
175
175 - create_table "sessions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
176 + create_table "sessions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
176 t.string "session_id"
177 t.string "session_id"
177 - t.text "data"
178 + t.text "data", limit: 16777215
178 t.datetime "updated_at"
179 t.datetime "updated_at"
179 t.index ["session_id"], name: "index_sessions_on_session_id"
180 t.index ["session_id"], name: "index_sessions_on_session_id"
180 t.index ["updated_at"], name: "index_sessions_on_updated_at"
181 t.index ["updated_at"], name: "index_sessions_on_updated_at"
181 end
182 end
182
183
183 - create_table "sites", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
184 + create_table "sites", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
184 t.string "name"
185 t.string "name"
185 t.boolean "started"
186 t.boolean "started"
186 t.datetime "start_time"
187 t.datetime "start_time"
187 - t.datetime "created_at"
188 + t.datetime "created_at", null: false
188 - t.datetime "updated_at"
189 + t.datetime "updated_at", null: false
189 t.integer "country_id"
190 t.integer "country_id"
190 t.string "password"
191 t.string "password"
191 end
192 end
192
193
193 create_table "submission_view_logs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
194 create_table "submission_view_logs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
194 t.integer "user_id"
195 t.integer "user_id"
195 t.integer "submission_id"
196 t.integer "submission_id"
196 - t.datetime "created_at"
197 + t.datetime "created_at", null: false
197 - t.datetime "updated_at"
198 + t.datetime "updated_at", null: false
198 end
199 end
199
200
200 - create_table "submissions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
201 + create_table "submissions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
201 t.integer "user_id"
202 t.integer "user_id"
202 t.integer "problem_id"
203 t.integer "problem_id"
203 t.integer "language_id"
204 t.integer "language_id"
204 t.text "source", limit: 16777215
205 t.text "source", limit: 16777215
205 t.binary "binary"
206 t.binary "binary"
206 t.datetime "submitted_at"
207 t.datetime "submitted_at"
207 t.datetime "compiled_at"
208 t.datetime "compiled_at"
208 - t.text "compiler_message"
209 + t.text "compiler_message", limit: 16777215
209 t.datetime "graded_at"
210 t.datetime "graded_at"
210 t.integer "points"
211 t.integer "points"
211 - t.text "grader_comment"
212 + t.text "grader_comment", limit: 16777215
212 t.integer "number"
213 t.integer "number"
213 t.string "source_filename"
214 t.string "source_filename"
214 t.float "max_runtime"
215 t.float "max_runtime"
215 t.integer "peak_memory"
216 t.integer "peak_memory"
216 t.integer "effective_code_length"
217 t.integer "effective_code_length"
217 t.string "ip_address"
218 t.string "ip_address"
219 + t.index ["submitted_at"], name: "index_submissions_on_submitted_at"
218 t.index ["user_id", "problem_id", "number"], name: "index_submissions_on_user_id_and_problem_id_and_number", unique: true
220 t.index ["user_id", "problem_id", "number"], name: "index_submissions_on_user_id_and_problem_id_and_number", unique: true
219 t.index ["user_id", "problem_id"], name: "index_submissions_on_user_id_and_problem_id"
221 t.index ["user_id", "problem_id"], name: "index_submissions_on_user_id_and_problem_id"
220 end
222 end
221
223
222 create_table "tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
224 create_table "tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
223 t.string "name", null: false
225 t.string "name", null: false
224 t.text "description"
226 t.text "description"
225 t.boolean "public"
227 t.boolean "public"
226 t.datetime "created_at", null: false
228 t.datetime "created_at", null: false
227 t.datetime "updated_at", null: false
229 t.datetime "updated_at", null: false
228 end
230 end
229
231
230 - create_table "tasks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
232 + create_table "tasks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
231 t.integer "submission_id"
233 t.integer "submission_id"
232 t.datetime "created_at"
234 t.datetime "created_at"
233 t.integer "status"
235 t.integer "status"
234 t.datetime "updated_at"
236 t.datetime "updated_at"
235 t.index ["submission_id"], name: "index_tasks_on_submission_id"
237 t.index ["submission_id"], name: "index_tasks_on_submission_id"
236 end
238 end
237
239
238 - create_table "test_pairs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
240 + create_table "test_pairs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
239 t.integer "problem_id"
241 t.integer "problem_id"
240 - t.text "input", limit: 16777215
242 + t.text "input", limit: 4294967295
241 - t.text "solution", limit: 16777215
243 + t.text "solution", limit: 4294967295
242 - t.datetime "created_at"
244 + t.datetime "created_at", null: false
243 - t.datetime "updated_at"
245 + t.datetime "updated_at", null: false
244 end
246 end
245
247
246 - create_table "test_requests", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
248 + create_table "test_requests", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
247 t.integer "user_id"
249 t.integer "user_id"
248 t.integer "problem_id"
250 t.integer "problem_id"
249 t.integer "submission_id"
251 t.integer "submission_id"
250 t.string "input_file_name"
252 t.string "input_file_name"
251 t.string "output_file_name"
253 t.string "output_file_name"
252 t.string "running_stat"
254 t.string "running_stat"
253 t.integer "status"
255 t.integer "status"
254 - t.datetime "updated_at"
256 + t.datetime "updated_at", null: false
255 t.datetime "submitted_at"
257 t.datetime "submitted_at"
256 t.datetime "compiled_at"
258 t.datetime "compiled_at"
257 - t.text "compiler_message"
259 + t.text "compiler_message", limit: 16777215
258 t.datetime "graded_at"
260 t.datetime "graded_at"
259 t.string "grader_comment"
261 t.string "grader_comment"
260 - t.datetime "created_at"
262 + t.datetime "created_at", null: false
261 t.float "running_time"
263 t.float "running_time"
262 t.string "exit_status"
264 t.string "exit_status"
263 t.integer "memory_usage"
265 t.integer "memory_usage"
264 t.index ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id"
266 t.index ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id"
265 end
267 end
266
268
267 create_table "testcases", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
269 create_table "testcases", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
268 t.integer "problem_id"
270 t.integer "problem_id"
269 t.integer "num"
271 t.integer "num"
270 t.integer "group"
272 t.integer "group"
271 t.integer "score"
273 t.integer "score"
272 t.text "input", limit: 4294967295
274 t.text "input", limit: 4294967295
273 t.text "sol", limit: 4294967295
275 t.text "sol", limit: 4294967295
274 - t.datetime "created_at"
276 + t.datetime "created_at", null: false
275 - t.datetime "updated_at"
277 + t.datetime "updated_at", null: false
276 t.index ["problem_id"], name: "index_testcases_on_problem_id"
278 t.index ["problem_id"], name: "index_testcases_on_problem_id"
277 end
279 end
278
280
279 - create_table "user_contest_stats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
281 + create_table "user_contest_stats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
280 t.integer "user_id"
282 t.integer "user_id"
281 t.datetime "started_at"
283 t.datetime "started_at"
282 - t.datetime "created_at"
284 + t.datetime "created_at", null: false
283 - t.datetime "updated_at"
285 + t.datetime "updated_at", null: false
284 t.boolean "forced_logout"
286 t.boolean "forced_logout"
285 end
287 end
286
288
287 - create_table "users", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t|
289 + create_table "users", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
288 t.string "login", limit: 50
290 t.string "login", limit: 50
289 t.string "full_name"
291 t.string "full_name"
290 t.string "hashed_password"
292 t.string "hashed_password"
291 t.string "salt", limit: 5
293 t.string "salt", limit: 5
292 t.string "alias"
294 t.string "alias"
293 t.string "email"
295 t.string "email"
294 t.integer "site_id"
296 t.integer "site_id"
295 t.integer "country_id"
297 t.integer "country_id"
296 t.boolean "activated", default: false
298 t.boolean "activated", default: false
297 t.datetime "created_at"
299 t.datetime "created_at"
298 t.datetime "updated_at"
300 t.datetime "updated_at"
299 t.string "section"
301 t.string "section"
You need to be logged in to leave comments. Login now