Description:
- change testcase data to longtext by limit size
- fix bug in new submission
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r631:79a5d1c218ba - - 4 files changed: 30 inserted, 24 deleted
@@ -0,0 +1,6 | |||||
|
|
1 | + class ChangeTestcaseSize < ActiveRecord::Migration | ||
|
|
2 | + def change | ||
|
|
3 | + change_column :testcases, :input, :text, :limit => 4294967295 | ||
|
|
4 | + change_column :testcases, :sol, :text, :limit => 4294967295 | ||
|
|
5 | + end | ||
|
|
6 | + end |
@@ -1,31 +1,31 | |||||
|
1 | class HeartbeatController < ApplicationController |
|
1 | class HeartbeatController < ApplicationController |
|
2 | before_filter :admin_authorization, :only => ['index'] |
|
2 | before_filter :admin_authorization, :only => ['index'] |
|
3 |
|
3 | ||
|
4 | def edit |
|
4 | def edit |
|
5 | - @user = User.find_by_login(params[:id]) |
|
5 | + #@user = User.find_by_login(params[:id]) |
|
6 | - unless @user |
|
6 | + #unless @user |
|
7 | - render text: "LOGIN_NOT_FOUND" |
|
7 | + # render text: "LOGIN_NOT_FOUND" |
|
8 | - return |
|
8 | + # return |
|
9 | - end |
|
9 | + #end |
|
10 |
|
10 | ||
|
11 | #hb = HeartBeat.where(user_id: @user.id, ip_address: request.remote_ip).first |
|
11 | #hb = HeartBeat.where(user_id: @user.id, ip_address: request.remote_ip).first |
|
12 | #puts "status = #{params[:status]}" |
|
12 | #puts "status = #{params[:status]}" |
|
13 | #if hb |
|
13 | #if hb |
|
14 | # if params[:status] |
|
14 | # if params[:status] |
|
15 | # hb.status = params[:status] |
|
15 | # hb.status = params[:status] |
|
16 | # hb.save |
|
16 | # hb.save |
|
17 | # end |
|
17 | # end |
|
18 | # hb.touch |
|
18 | # hb.touch |
|
19 | #else |
|
19 | #else |
|
20 | # HeartBeat.creae(user_id: @user.id, ip_address: request.remote_ip) |
|
20 | # HeartBeat.creae(user_id: @user.id, ip_address: request.remote_ip) |
|
21 | #end |
|
21 | #end |
|
22 | - HeartBeat.create(user_id: @user.id, ip_address: request.remote_ip, status: params[:status]) |
|
22 | + #HeartBeat.create(user_id: @user.id, ip_address: request.remote_ip, status: params[:status]) |
|
23 |
|
23 | ||
|
24 | render text: (GraderConfiguration['right.heartbeat_response'] || 'OK') |
|
24 | render text: (GraderConfiguration['right.heartbeat_response'] || 'OK') |
|
25 | end |
|
25 | end |
|
26 |
|
26 | ||
|
27 | def index |
|
27 | def index |
|
28 | @hb = HeartBeat.where("updated_at >= ?",Time.zone.now-2.hours).includes(:user).order(:user_id).all |
|
28 | @hb = HeartBeat.where("updated_at >= ?",Time.zone.now-2.hours).includes(:user).order(:user_id).all |
|
29 | @num = HeartBeat.where("updated_at >= ?",Time.zone.now-5.minutes).count(:user_id,distinct: true) |
|
29 | @num = HeartBeat.where("updated_at >= ?",Time.zone.now-5.minutes).count(:user_id,distinct: true) |
|
30 | end |
|
30 | end |
|
31 | end |
|
31 | end |
@@ -19,25 +19,25 | |||||
|
19 | = label_tag "Task:" |
|
19 | = label_tag "Task:" |
|
20 | = text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true |
|
20 | = text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true |
|
21 |
|
21 | ||
|
22 | .form-group |
|
22 | .form-group |
|
23 | = label_tag 'Language' |
|
23 | = label_tag 'Language' |
|
24 | = select_tag 'language_id', options_from_collection_for_select(Language.all, 'id', 'pretty_name', @lang_id || Language.find_by_pretty_name("Python").id || Language.first.id), class: 'form-control select', style: "width: 100px" |
|
24 | = select_tag 'language_id', options_from_collection_for_select(Language.all, 'id', 'pretty_name', @lang_id || Language.find_by_pretty_name("Python").id || Language.first.id), class: 'form-control select', style: "width: 100px" |
|
25 | .form-group |
|
25 | .form-group |
|
26 | = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
26 | = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
27 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
27 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
28 | .panel.panel-info |
|
28 | .panel.panel-info |
|
29 | .panel-heading |
|
29 | .panel-heading |
|
30 | Latest Submission Status |
|
30 | Latest Submission Status |
|
31 | - = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn-default btn-sm", remote: true |
|
31 | + = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn-default btn-sm", remote: true if @submission |
|
32 | .panel-body |
|
32 | .panel-body |
|
33 | - if @submission |
|
33 | - if @submission |
|
34 | = render :partial => 'submission_short', |
|
34 | = render :partial => 'submission_short', |
|
35 | :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id } |
|
35 | :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id } |
|
36 | .row |
|
36 | .row |
|
37 | .col-md-12 |
|
37 | .col-md-12 |
|
38 | %h2 Console |
|
38 | %h2 Console |
|
39 | %textarea#console{style: 'height: 100%; width: 100%;background-color:#000;color:#fff;font-family: consolas, monaco, "Droid Sans Mono";',rows: 20} |
|
39 | %textarea#console{style: 'height: 100%; width: 100%;background-color:#000;color:#fff;font-family: consolas, monaco, "Droid Sans Mono";',rows: 20} |
|
40 |
|
40 | ||
|
41 | :javascript |
|
41 | :javascript |
|
42 | $(document).ready(function() { |
|
42 | $(document).ready(function() { |
|
43 | e = ace.edit("editor") |
|
43 | e = ace.edit("editor") |
@@ -2,29 +2,29 | |||||
|
2 | # This file is auto-generated from the current state of the database. Instead |
|
2 | # This file is auto-generated from the current state of the database. Instead |
|
3 | # of editing this file, please use the migrations feature of Active Record to |
|
3 | # of editing this file, please use the migrations feature of Active Record to |
|
4 | # incrementally modify your database, and then regenerate this schema definition. |
|
4 | # incrementally modify your database, and then regenerate this schema definition. |
|
5 | # |
|
5 | # |
|
6 | # Note that this schema.rb definition is the authoritative source for your |
|
6 | # Note that this schema.rb definition is the authoritative source for your |
|
7 | # database schema. If you need to create the application database on another |
|
7 | # database schema. If you need to create the application database on another |
|
8 | # system, you should be using db:schema:load, not running all the migrations |
|
8 | # system, you should be using db:schema:load, not running all the migrations |
|
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations |
|
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations |
|
10 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
|
10 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
|
11 | # |
|
11 | # |
|
12 | # It's strongly recommended that you check this file into your version control system. |
|
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: 20170123162543) do |
|
15 |
|
15 | ||
|
16 | create_table "announcements", force: :cascade do |t| |
|
16 | create_table "announcements", force: :cascade do |t| |
|
17 | t.string "author", limit: 255 |
|
17 | t.string "author", limit: 255 |
|
18 |
- t.text "body", limit: |
|
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", limit: 255 |
|
24 | t.string "title", limit: 255 |
|
25 | t.string "notes", limit: 255 |
|
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", limit: 255 |
|
29 | t.string "title", limit: 255 |
|
30 | t.boolean "enabled" |
|
30 | t.boolean "enabled" |
@@ -41,37 +41,37 | |||||
|
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", limit: 4 |
|
42 | t.integer "contest_id", limit: 4 |
|
43 | t.integer "user_id", limit: 4 |
|
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", limit: 255 |
|
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", limit: |
|
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", limit: 255 |
|
60 | t.string "key", limit: 255 |
|
61 | t.string "value_type", limit: 255 |
|
61 | t.string "value_type", limit: 255 |
|
62 | t.string "value", limit: 255 |
|
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", limit: |
|
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", limit: 255 |
|
69 | t.string "host", limit: 255 |
|
70 | t.integer "pid", limit: 4 |
|
70 | t.integer "pid", limit: 4 |
|
71 | t.string "mode", limit: 255 |
|
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", limit: 4 |
|
75 | t.integer "task_id", limit: 4 |
|
76 | t.string "task_type", limit: 255 |
|
76 | t.string "task_type", limit: 255 |
|
77 | t.boolean "terminated" |
|
77 | t.boolean "terminated" |
@@ -98,25 +98,25 | |||||
|
98 |
|
98 | ||
|
99 | create_table "logins", force: :cascade do |t| |
|
99 | create_table "logins", force: :cascade do |t| |
|
100 | t.integer "user_id", limit: 4 |
|
100 | t.integer "user_id", limit: 4 |
|
101 | t.string "ip_address", limit: 255 |
|
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", limit: 4 |
|
107 | t.integer "sender_id", limit: 4 |
|
108 | t.integer "receiver_id", limit: 4 |
|
108 | t.integer "receiver_id", limit: 4 |
|
109 | t.integer "replying_message_id", limit: 4 |
|
109 | t.integer "replying_message_id", limit: 4 |
|
110 |
- t.text "body", limit: |
|
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 | create_table "problems", force: :cascade do |t| |
|
116 | create_table "problems", force: :cascade do |t| |
|
117 | t.string "name", limit: 30 |
|
117 | t.string "name", limit: 30 |
|
118 | t.string "full_name", limit: 255 |
|
118 | t.string "full_name", limit: 255 |
|
119 | t.integer "full_score", limit: 4 |
|
119 | t.integer "full_score", limit: 4 |
|
120 | t.date "date_added" |
|
120 | t.date "date_added" |
|
121 | t.boolean "available" |
|
121 | t.boolean "available" |
|
122 | t.string "url", limit: 255 |
|
122 | t.string "url", limit: 255 |
@@ -143,25 +143,25 | |||||
|
143 | t.string "name", limit: 255 |
|
143 | t.string "name", limit: 255 |
|
144 | end |
|
144 | end |
|
145 |
|
145 | ||
|
146 | create_table "roles_users", id: false, force: :cascade do |t| |
|
146 | create_table "roles_users", id: false, force: :cascade do |t| |
|
147 | t.integer "role_id", limit: 4 |
|
147 | t.integer "role_id", limit: 4 |
|
148 | t.integer "user_id", limit: 4 |
|
148 | t.integer "user_id", limit: 4 |
|
149 | end |
|
149 | end |
|
150 |
|
150 | ||
|
151 | add_index "roles_users", ["user_id"], name: "index_roles_users_on_user_id", using: :btree |
|
151 | add_index "roles_users", ["user_id"], name: "index_roles_users_on_user_id", using: :btree |
|
152 |
|
152 | ||
|
153 | create_table "sessions", force: :cascade do |t| |
|
153 | create_table "sessions", force: :cascade do |t| |
|
154 | t.string "session_id", limit: 255 |
|
154 | t.string "session_id", limit: 255 |
|
155 |
- t.text "data", limit: |
|
155 | + t.text "data", limit: 16777215 |
|
156 | t.datetime "updated_at" |
|
156 | t.datetime "updated_at" |
|
157 | end |
|
157 | end |
|
158 |
|
158 | ||
|
159 | add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree |
|
159 | add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree |
|
160 | add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree |
|
160 | add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree |
|
161 |
|
161 | ||
|
162 | create_table "sites", force: :cascade do |t| |
|
162 | create_table "sites", force: :cascade do |t| |
|
163 | t.string "name", limit: 255 |
|
163 | t.string "name", limit: 255 |
|
164 | t.boolean "started" |
|
164 | t.boolean "started" |
|
165 | t.datetime "start_time" |
|
165 | t.datetime "start_time" |
|
166 | t.datetime "created_at", null: false |
|
166 | t.datetime "created_at", null: false |
|
167 | t.datetime "updated_at", null: false |
|
167 | t.datetime "updated_at", null: false |
@@ -171,110 +171,110 | |||||
|
171 |
|
171 | ||
|
172 | create_table "submission_view_logs", force: :cascade do |t| |
|
172 | create_table "submission_view_logs", force: :cascade do |t| |
|
173 | t.integer "user_id", limit: 4 |
|
173 | t.integer "user_id", limit: 4 |
|
174 | t.integer "submission_id", limit: 4 |
|
174 | t.integer "submission_id", limit: 4 |
|
175 | t.datetime "created_at", null: false |
|
175 | t.datetime "created_at", null: false |
|
176 | t.datetime "updated_at", null: false |
|
176 | t.datetime "updated_at", null: false |
|
177 | end |
|
177 | end |
|
178 |
|
178 | ||
|
179 | create_table "submissions", force: :cascade do |t| |
|
179 | create_table "submissions", force: :cascade do |t| |
|
180 | t.integer "user_id", limit: 4 |
|
180 | t.integer "user_id", limit: 4 |
|
181 | t.integer "problem_id", limit: 4 |
|
181 | t.integer "problem_id", limit: 4 |
|
182 | t.integer "language_id", limit: 4 |
|
182 | t.integer "language_id", limit: 4 |
|
183 |
- t.text "source", limit: |
|
183 | + t.text "source", limit: 16777215 |
|
184 | t.binary "binary", limit: 65535 |
|
184 | t.binary "binary", limit: 65535 |
|
185 | t.datetime "submitted_at" |
|
185 | t.datetime "submitted_at" |
|
186 | t.datetime "compiled_at" |
|
186 | t.datetime "compiled_at" |
|
187 |
- t.text "compiler_message", limit: |
|
187 | + t.text "compiler_message", limit: 16777215 |
|
188 | t.datetime "graded_at" |
|
188 | t.datetime "graded_at" |
|
189 | t.integer "points", limit: 4 |
|
189 | t.integer "points", limit: 4 |
|
190 |
- t.text "grader_comment", limit: |
|
190 | + t.text "grader_comment", limit: 16777215 |
|
191 | t.integer "number", limit: 4 |
|
191 | t.integer "number", limit: 4 |
|
192 | t.string "source_filename", limit: 255 |
|
192 | t.string "source_filename", limit: 255 |
|
193 | t.float "max_runtime", limit: 24 |
|
193 | t.float "max_runtime", limit: 24 |
|
194 | t.integer "peak_memory", limit: 4 |
|
194 | t.integer "peak_memory", limit: 4 |
|
195 | t.integer "effective_code_length", limit: 4 |
|
195 | t.integer "effective_code_length", limit: 4 |
|
196 | t.string "ip_address", limit: 255 |
|
196 | t.string "ip_address", limit: 255 |
|
197 | end |
|
197 | end |
|
198 |
|
198 | ||
|
199 | add_index "submissions", ["user_id", "problem_id", "number"], name: "index_submissions_on_user_id_and_problem_id_and_number", unique: true, using: :btree |
|
199 | add_index "submissions", ["user_id", "problem_id", "number"], name: "index_submissions_on_user_id_and_problem_id_and_number", unique: true, using: :btree |
|
200 | add_index "submissions", ["user_id", "problem_id"], name: "index_submissions_on_user_id_and_problem_id", using: :btree |
|
200 | add_index "submissions", ["user_id", "problem_id"], name: "index_submissions_on_user_id_and_problem_id", using: :btree |
|
201 |
|
201 | ||
|
202 | create_table "tasks", force: :cascade do |t| |
|
202 | create_table "tasks", force: :cascade do |t| |
|
203 | t.integer "submission_id", limit: 4 |
|
203 | t.integer "submission_id", limit: 4 |
|
204 | t.datetime "created_at" |
|
204 | t.datetime "created_at" |
|
205 | t.integer "status", limit: 4 |
|
205 | t.integer "status", limit: 4 |
|
206 | t.datetime "updated_at" |
|
206 | t.datetime "updated_at" |
|
207 | end |
|
207 | end |
|
208 |
|
208 | ||
|
209 | create_table "test_pairs", force: :cascade do |t| |
|
209 | create_table "test_pairs", force: :cascade do |t| |
|
210 | t.integer "problem_id", limit: 4 |
|
210 | t.integer "problem_id", limit: 4 |
|
211 |
- t.text "input", limit: |
|
211 | + t.text "input", limit: 4294967295 |
|
212 |
- t.text "solution", limit: |
|
212 | + t.text "solution", limit: 4294967295 |
|
213 | t.datetime "created_at", null: false |
|
213 | t.datetime "created_at", null: false |
|
214 | t.datetime "updated_at", null: false |
|
214 | t.datetime "updated_at", null: false |
|
215 | end |
|
215 | end |
|
216 |
|
216 | ||
|
217 | create_table "test_requests", force: :cascade do |t| |
|
217 | create_table "test_requests", force: :cascade do |t| |
|
218 | t.integer "user_id", limit: 4 |
|
218 | t.integer "user_id", limit: 4 |
|
219 | t.integer "problem_id", limit: 4 |
|
219 | t.integer "problem_id", limit: 4 |
|
220 | t.integer "submission_id", limit: 4 |
|
220 | t.integer "submission_id", limit: 4 |
|
221 | t.string "input_file_name", limit: 255 |
|
221 | t.string "input_file_name", limit: 255 |
|
222 | t.string "output_file_name", limit: 255 |
|
222 | t.string "output_file_name", limit: 255 |
|
223 | t.string "running_stat", limit: 255 |
|
223 | t.string "running_stat", limit: 255 |
|
224 | t.integer "status", limit: 4 |
|
224 | t.integer "status", limit: 4 |
|
225 | t.datetime "updated_at", null: false |
|
225 | t.datetime "updated_at", null: false |
|
226 | t.datetime "submitted_at" |
|
226 | t.datetime "submitted_at" |
|
227 | t.datetime "compiled_at" |
|
227 | t.datetime "compiled_at" |
|
228 |
- t.text "compiler_message", limit: |
|
228 | + t.text "compiler_message", limit: 16777215 |
|
229 | t.datetime "graded_at" |
|
229 | t.datetime "graded_at" |
|
230 | t.string "grader_comment", limit: 255 |
|
230 | t.string "grader_comment", limit: 255 |
|
231 | t.datetime "created_at", null: false |
|
231 | t.datetime "created_at", null: false |
|
232 | t.float "running_time", limit: 24 |
|
232 | t.float "running_time", limit: 24 |
|
233 | t.string "exit_status", limit: 255 |
|
233 | t.string "exit_status", limit: 255 |
|
234 | t.integer "memory_usage", limit: 4 |
|
234 | t.integer "memory_usage", limit: 4 |
|
235 | end |
|
235 | end |
|
236 |
|
236 | ||
|
237 | add_index "test_requests", ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id", using: :btree |
|
237 | add_index "test_requests", ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id", using: :btree |
|
238 |
|
238 | ||
|
239 | create_table "testcases", force: :cascade do |t| |
|
239 | create_table "testcases", force: :cascade do |t| |
|
240 | t.integer "problem_id", limit: 4 |
|
240 | t.integer "problem_id", limit: 4 |
|
241 | t.integer "num", limit: 4 |
|
241 | t.integer "num", limit: 4 |
|
242 | t.integer "group", limit: 4 |
|
242 | t.integer "group", limit: 4 |
|
243 | t.integer "score", limit: 4 |
|
243 | t.integer "score", limit: 4 |
|
244 |
- t.text "input", limit: |
|
244 | + t.text "input", limit: 4294967295 |
|
245 |
- t.text "sol", limit: |
|
245 | + t.text "sol", limit: 4294967295 |
|
246 | - t.datetime "created_at" |
|
246 | + t.datetime "created_at", null: false |
|
247 | - t.datetime "updated_at" |
|
247 | + t.datetime "updated_at", null: false |
|
248 | end |
|
248 | end |
|
249 |
|
249 | ||
|
250 | add_index "testcases", ["problem_id"], name: "index_testcases_on_problem_id", using: :btree |
|
250 | add_index "testcases", ["problem_id"], name: "index_testcases_on_problem_id", using: :btree |
|
251 |
|
251 | ||
|
252 | create_table "user_contest_stats", force: :cascade do |t| |
|
252 | create_table "user_contest_stats", force: :cascade do |t| |
|
253 | t.integer "user_id", limit: 4 |
|
253 | t.integer "user_id", limit: 4 |
|
254 | t.datetime "started_at" |
|
254 | t.datetime "started_at" |
|
255 | t.datetime "created_at", null: false |
|
255 | t.datetime "created_at", null: false |
|
256 | t.datetime "updated_at", null: false |
|
256 | t.datetime "updated_at", null: false |
|
257 | t.boolean "forced_logout" |
|
257 | t.boolean "forced_logout" |
|
258 | end |
|
258 | end |
|
259 |
|
259 | ||
|
260 | create_table "users", force: :cascade do |t| |
|
260 | create_table "users", force: :cascade do |t| |
|
261 | t.string "login", limit: 50 |
|
261 | t.string "login", limit: 50 |
|
262 | t.string "full_name", limit: 255 |
|
262 | t.string "full_name", limit: 255 |
|
263 | t.string "hashed_password", limit: 255 |
|
263 | t.string "hashed_password", limit: 255 |
|
264 | t.string "salt", limit: 5 |
|
264 | t.string "salt", limit: 5 |
|
265 | t.string "alias", limit: 255 |
|
265 | t.string "alias", limit: 255 |
|
266 | t.string "email", limit: 255 |
|
266 | t.string "email", limit: 255 |
|
267 | t.integer "site_id", limit: 4 |
|
267 | t.integer "site_id", limit: 4 |
|
268 | t.integer "country_id", limit: 4 |
|
268 | t.integer "country_id", limit: 4 |
|
269 | t.boolean "activated", default: false |
|
269 | t.boolean "activated", default: false |
|
270 | t.datetime "created_at" |
|
270 | t.datetime "created_at" |
|
271 | t.datetime "updated_at" |
|
271 | t.datetime "updated_at" |
|
|
272 | + t.string "section", limit: 255 | ||
|
272 | t.boolean "enabled", default: true |
|
273 | t.boolean "enabled", default: true |
|
273 | t.string "remark", limit: 255 |
|
274 | t.string "remark", limit: 255 |
|
274 | t.string "last_ip", limit: 255 |
|
275 | t.string "last_ip", limit: 255 |
|
275 | - t.string "section", limit: 255 |
|
||
|
276 | end |
|
276 | end |
|
277 |
|
277 | ||
|
278 | add_index "users", ["login"], name: "index_users_on_login", unique: true, using: :btree |
|
278 | add_index "users", ["login"], name: "index_users_on_login", unique: true, using: :btree |
|
279 |
|
279 | ||
|
280 | end |
|
280 | end |
You need to be logged in to leave comments.
Login now