Description:
merge
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r844:509b8db382d4 - - 1 file changed: 2 inserted, 1 deleted
@@ -1,109 +1,109 | |||||
|
1 | # This file is auto-generated from the current state of the database. Instead |
|
1 | # This file is auto-generated from the current state of the database. Instead |
|
2 | # of editing this file, please use the migrations feature of Active Record to |
|
2 | # of editing this file, please use the migrations feature of Active Record to |
|
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: 2021_0 |
|
13 | + ActiveRecord::Schema.define(version: 2021_08_09_105935) do |
|
14 |
|
14 | ||
|
15 | create_table "announcements", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
15 | create_table "announcements", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
16 | t.string "author" |
|
16 | t.string "author" |
|
17 | t.text "body" |
|
17 | t.text "body" |
|
18 | t.boolean "published" |
|
18 | t.boolean "published" |
|
19 | t.datetime "created_at", null: false |
|
19 | t.datetime "created_at", null: false |
|
20 | t.datetime "updated_at", null: false |
|
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 | t.boolean "on_nav_bar", default: false |
|
25 | t.boolean "on_nav_bar", default: false |
|
26 | end |
|
26 | end |
|
27 |
|
27 | ||
|
28 | create_table "contests", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
28 | create_table "contests", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
29 | t.string "title" |
|
29 | t.string "title" |
|
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" |
|
34 | end |
|
34 | end |
|
35 |
|
35 | ||
|
36 | create_table "contests_problems", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
36 | create_table "contests_problems", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
37 | t.integer "contest_id" |
|
37 | t.integer "contest_id" |
|
38 | t.integer "problem_id" |
|
38 | t.integer "problem_id" |
|
39 | end |
|
39 | end |
|
40 |
|
40 | ||
|
41 | create_table "contests_users", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
41 | create_table "contests_users", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
42 | t.integer "contest_id" |
|
42 | t.integer "contest_id" |
|
43 | t.integer "user_id" |
|
43 | t.integer "user_id" |
|
44 | end |
|
44 | end |
|
45 |
|
45 | ||
|
46 | create_table "countries", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
46 | create_table "countries", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
47 | t.string "name" |
|
47 | t.string "name" |
|
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", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
52 | create_table "descriptions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
53 | t.text "body" |
|
53 | t.text "body" |
|
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", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
59 | create_table "grader_configurations", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
60 | t.string "key" |
|
60 | t.string "key" |
|
61 | t.string "value_type" |
|
61 | t.string "value_type" |
|
62 | t.string "value" |
|
62 | t.string "value" |
|
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" |
|
66 | end |
|
66 | end |
|
67 |
|
67 | ||
|
68 | create_table "grader_processes", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
68 | create_table "grader_processes", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
69 | t.string "host" |
|
69 | t.string "host" |
|
70 | t.integer "pid" |
|
70 | t.integer "pid" |
|
71 | t.string "mode" |
|
71 | t.string "mode" |
|
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" |
|
76 | t.string "task_type" |
|
76 | t.string "task_type" |
|
77 | t.boolean "terminated" |
|
77 | t.boolean "terminated" |
|
78 | t.index ["host", "pid"], name: "index_grader_processes_on_ip_and_pid" |
|
78 | t.index ["host", "pid"], name: "index_grader_processes_on_ip_and_pid" |
|
79 | end |
|
79 | end |
|
80 |
|
80 | ||
|
81 | create_table "groups", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
81 | create_table "groups", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
82 | t.string "name" |
|
82 | t.string "name" |
|
83 | t.string "description" |
|
83 | t.string "description" |
|
84 | t.boolean "enabled", default: true |
|
84 | t.boolean "enabled", default: true |
|
85 | end |
|
85 | end |
|
86 |
|
86 | ||
|
87 | create_table "groups_problems", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
87 | create_table "groups_problems", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
88 | t.integer "problem_id", null: false |
|
88 | t.integer "problem_id", null: false |
|
89 | t.integer "group_id", null: false |
|
89 | t.integer "group_id", null: false |
|
90 | t.index ["group_id", "problem_id"], name: "index_groups_problems_on_group_id_and_problem_id" |
|
90 | t.index ["group_id", "problem_id"], name: "index_groups_problems_on_group_id_and_problem_id" |
|
91 | end |
|
91 | end |
|
92 |
|
92 | ||
|
93 | create_table "groups_users", options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
93 | create_table "groups_users", options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
94 | t.integer "group_id", null: false |
|
94 | t.integer "group_id", null: false |
|
95 | t.integer "user_id", null: false |
|
95 | t.integer "user_id", null: false |
|
96 | t.index ["user_id", "group_id"], name: "index_groups_users_on_user_id_and_group_id" |
|
96 | t.index ["user_id", "group_id"], name: "index_groups_users_on_user_id_and_group_id" |
|
97 | end |
|
97 | end |
|
98 |
|
98 | ||
|
99 | create_table "heart_beats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
99 | create_table "heart_beats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
100 | t.integer "user_id" |
|
100 | t.integer "user_id" |
|
101 | t.string "ip_address" |
|
101 | t.string "ip_address" |
|
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 | t.string "status" |
|
104 | t.string "status" |
|
105 | t.index ["updated_at"], name: "index_heart_beats_on_updated_at" |
|
105 | t.index ["updated_at"], name: "index_heart_beats_on_updated_at" |
|
106 | end |
|
106 | end |
|
107 |
|
107 | ||
|
108 | create_table "languages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
108 | create_table "languages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
109 | t.string "name", limit: 10 |
|
109 | t.string "name", limit: 10 |
@@ -142,171 +142,172 | |||||
|
142 | t.boolean "output_only" |
|
142 | t.boolean "output_only" |
|
143 | t.string "description_filename" |
|
143 | t.string "description_filename" |
|
144 | t.boolean "view_testcase" |
|
144 | t.boolean "view_testcase" |
|
145 | end |
|
145 | end |
|
146 |
|
146 | ||
|
147 | create_table "problems_tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
147 | create_table "problems_tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
148 | t.integer "problem_id" |
|
148 | t.integer "problem_id" |
|
149 | t.integer "tag_id" |
|
149 | t.integer "tag_id" |
|
150 | t.index ["problem_id", "tag_id"], name: "index_problems_tags_on_problem_id_and_tag_id", unique: true |
|
150 | t.index ["problem_id", "tag_id"], name: "index_problems_tags_on_problem_id_and_tag_id", unique: true |
|
151 | t.index ["problem_id"], name: "index_problems_tags_on_problem_id" |
|
151 | t.index ["problem_id"], name: "index_problems_tags_on_problem_id" |
|
152 | t.index ["tag_id"], name: "index_problems_tags_on_tag_id" |
|
152 | t.index ["tag_id"], name: "index_problems_tags_on_tag_id" |
|
153 | end |
|
153 | end |
|
154 |
|
154 | ||
|
155 | create_table "rights", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
155 | create_table "rights", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
156 | t.string "name" |
|
156 | t.string "name" |
|
157 | t.string "controller" |
|
157 | t.string "controller" |
|
158 | t.string "action" |
|
158 | t.string "action" |
|
159 | end |
|
159 | end |
|
160 |
|
160 | ||
|
161 | create_table "rights_roles", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
161 | create_table "rights_roles", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
162 | t.integer "right_id" |
|
162 | t.integer "right_id" |
|
163 | t.integer "role_id" |
|
163 | t.integer "role_id" |
|
164 | t.index ["role_id"], name: "index_rights_roles_on_role_id" |
|
164 | t.index ["role_id"], name: "index_rights_roles_on_role_id" |
|
165 | end |
|
165 | end |
|
166 |
|
166 | ||
|
167 | create_table "roles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
167 | create_table "roles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
168 | t.string "name" |
|
168 | t.string "name" |
|
169 | end |
|
169 | end |
|
170 |
|
170 | ||
|
171 | create_table "roles_users", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
171 | create_table "roles_users", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
172 | t.integer "role_id" |
|
172 | t.integer "role_id" |
|
173 | t.integer "user_id" |
|
173 | t.integer "user_id" |
|
174 | t.index ["user_id"], name: "index_roles_users_on_user_id" |
|
174 | t.index ["user_id"], name: "index_roles_users_on_user_id" |
|
175 | end |
|
175 | end |
|
176 |
|
176 | ||
|
177 | create_table "sessions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
177 | create_table "sessions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
178 | t.string "session_id" |
|
178 | t.string "session_id" |
|
179 | t.text "data" |
|
179 | t.text "data" |
|
180 | t.datetime "updated_at" |
|
180 | t.datetime "updated_at" |
|
181 | t.index ["session_id"], name: "index_sessions_on_session_id" |
|
181 | t.index ["session_id"], name: "index_sessions_on_session_id" |
|
182 | t.index ["updated_at"], name: "index_sessions_on_updated_at" |
|
182 | t.index ["updated_at"], name: "index_sessions_on_updated_at" |
|
183 | end |
|
183 | end |
|
184 |
|
184 | ||
|
185 | create_table "sites", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
185 | create_table "sites", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
186 | t.string "name" |
|
186 | t.string "name" |
|
187 | t.boolean "started" |
|
187 | t.boolean "started" |
|
188 | t.datetime "start_time" |
|
188 | t.datetime "start_time" |
|
189 | t.datetime "created_at", null: false |
|
189 | t.datetime "created_at", null: false |
|
190 | t.datetime "updated_at", null: false |
|
190 | t.datetime "updated_at", null: false |
|
191 | t.integer "country_id" |
|
191 | t.integer "country_id" |
|
192 | t.string "password" |
|
192 | t.string "password" |
|
193 | end |
|
193 | end |
|
194 |
|
194 | ||
|
195 | create_table "submission_view_logs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
195 | create_table "submission_view_logs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
196 | t.integer "user_id" |
|
196 | t.integer "user_id" |
|
197 | t.integer "submission_id" |
|
197 | t.integer "submission_id" |
|
198 | t.datetime "created_at", null: false |
|
198 | t.datetime "created_at", null: false |
|
199 | t.datetime "updated_at", null: false |
|
199 | t.datetime "updated_at", null: false |
|
200 | end |
|
200 | end |
|
201 |
|
201 | ||
|
202 | create_table "submissions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
202 | create_table "submissions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
203 | t.integer "user_id" |
|
203 | t.integer "user_id" |
|
204 | t.integer "problem_id" |
|
204 | t.integer "problem_id" |
|
205 | t.integer "language_id" |
|
205 | t.integer "language_id" |
|
206 | t.text "source", limit: 16777215 |
|
206 | t.text "source", limit: 16777215 |
|
207 | t.binary "binary" |
|
207 | t.binary "binary" |
|
208 | t.datetime "submitted_at" |
|
208 | t.datetime "submitted_at" |
|
209 | t.datetime "compiled_at" |
|
209 | t.datetime "compiled_at" |
|
210 | t.text "compiler_message" |
|
210 | t.text "compiler_message" |
|
211 | t.datetime "graded_at" |
|
211 | t.datetime "graded_at" |
|
212 | t.integer "points" |
|
212 | t.integer "points" |
|
213 | t.text "grader_comment" |
|
213 | t.text "grader_comment" |
|
214 | t.integer "number" |
|
214 | t.integer "number" |
|
215 | t.string "source_filename" |
|
215 | t.string "source_filename" |
|
216 | t.float "max_runtime" |
|
216 | t.float "max_runtime" |
|
217 | t.integer "peak_memory" |
|
217 | t.integer "peak_memory" |
|
218 | t.integer "effective_code_length" |
|
218 | t.integer "effective_code_length" |
|
219 | t.string "ip_address" |
|
219 | t.string "ip_address" |
|
220 | t.index ["submitted_at"], name: "index_submissions_on_submitted_at" |
|
220 | t.index ["submitted_at"], name: "index_submissions_on_submitted_at" |
|
221 | t.index ["user_id", "problem_id", "number"], name: "index_submissions_on_user_id_and_problem_id_and_number", unique: true |
|
221 | t.index ["user_id", "problem_id", "number"], name: "index_submissions_on_user_id_and_problem_id_and_number", unique: true |
|
222 | t.index ["user_id", "problem_id"], name: "index_submissions_on_user_id_and_problem_id" |
|
222 | t.index ["user_id", "problem_id"], name: "index_submissions_on_user_id_and_problem_id" |
|
223 | end |
|
223 | end |
|
224 |
|
224 | ||
|
225 | create_table "tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
225 | create_table "tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
226 | t.string "name", null: false |
|
226 | t.string "name", null: false |
|
227 | t.text "description" |
|
227 | t.text "description" |
|
228 | t.boolean "public" |
|
228 | t.boolean "public" |
|
229 | t.datetime "created_at", null: false |
|
229 | t.datetime "created_at", null: false |
|
230 | t.datetime "updated_at", null: false |
|
230 | t.datetime "updated_at", null: false |
|
231 | end |
|
231 | end |
|
232 |
|
232 | ||
|
233 | create_table "tasks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
233 | create_table "tasks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
234 | t.integer "submission_id" |
|
234 | t.integer "submission_id" |
|
235 | t.datetime "created_at" |
|
235 | t.datetime "created_at" |
|
236 | t.integer "status" |
|
236 | t.integer "status" |
|
237 | t.datetime "updated_at" |
|
237 | t.datetime "updated_at" |
|
|
238 | + t.index ["status"], name: "index_tasks_on_status" | ||
|
238 | t.index ["submission_id"], name: "index_tasks_on_submission_id" |
|
239 | t.index ["submission_id"], name: "index_tasks_on_submission_id" |
|
239 | end |
|
240 | end |
|
240 |
|
241 | ||
|
241 | create_table "test_pairs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
242 | create_table "test_pairs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
242 | t.integer "problem_id" |
|
243 | t.integer "problem_id" |
|
243 | t.text "input", limit: 16777215 |
|
244 | t.text "input", limit: 16777215 |
|
244 | t.text "solution", limit: 16777215 |
|
245 | t.text "solution", limit: 16777215 |
|
245 | t.datetime "created_at", null: false |
|
246 | t.datetime "created_at", null: false |
|
246 | t.datetime "updated_at", null: false |
|
247 | t.datetime "updated_at", null: false |
|
247 | end |
|
248 | end |
|
248 |
|
249 | ||
|
249 | create_table "test_requests", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
250 | create_table "test_requests", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
250 | t.integer "user_id" |
|
251 | t.integer "user_id" |
|
251 | t.integer "problem_id" |
|
252 | t.integer "problem_id" |
|
252 | t.integer "submission_id" |
|
253 | t.integer "submission_id" |
|
253 | t.string "input_file_name" |
|
254 | t.string "input_file_name" |
|
254 | t.string "output_file_name" |
|
255 | t.string "output_file_name" |
|
255 | t.string "running_stat" |
|
256 | t.string "running_stat" |
|
256 | t.integer "status" |
|
257 | t.integer "status" |
|
257 | t.datetime "updated_at", null: false |
|
258 | t.datetime "updated_at", null: false |
|
258 | t.datetime "submitted_at" |
|
259 | t.datetime "submitted_at" |
|
259 | t.datetime "compiled_at" |
|
260 | t.datetime "compiled_at" |
|
260 | t.text "compiler_message" |
|
261 | t.text "compiler_message" |
|
261 | t.datetime "graded_at" |
|
262 | t.datetime "graded_at" |
|
262 | t.string "grader_comment" |
|
263 | t.string "grader_comment" |
|
263 | t.datetime "created_at", null: false |
|
264 | t.datetime "created_at", null: false |
|
264 | t.float "running_time" |
|
265 | t.float "running_time" |
|
265 | t.string "exit_status" |
|
266 | t.string "exit_status" |
|
266 | t.integer "memory_usage" |
|
267 | t.integer "memory_usage" |
|
267 | t.index ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id" |
|
268 | t.index ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id" |
|
268 | end |
|
269 | end |
|
269 |
|
270 | ||
|
270 | create_table "testcases", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
271 | create_table "testcases", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
|
271 | t.integer "problem_id" |
|
272 | t.integer "problem_id" |
|
272 | t.integer "num" |
|
273 | t.integer "num" |
|
273 | t.integer "group" |
|
274 | t.integer "group" |
|
274 | t.integer "score" |
|
275 | t.integer "score" |
|
275 | t.text "input", limit: 4294967295 |
|
276 | t.text "input", limit: 4294967295 |
|
276 | t.text "sol", limit: 4294967295 |
|
277 | t.text "sol", limit: 4294967295 |
|
277 | t.datetime "created_at" |
|
278 | t.datetime "created_at" |
|
278 | t.datetime "updated_at" |
|
279 | t.datetime "updated_at" |
|
279 | t.index ["problem_id"], name: "index_testcases_on_problem_id" |
|
280 | t.index ["problem_id"], name: "index_testcases_on_problem_id" |
|
280 | end |
|
281 | end |
|
281 |
|
282 | ||
|
282 | create_table "user_contest_stats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
283 | create_table "user_contest_stats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
283 | t.integer "user_id" |
|
284 | t.integer "user_id" |
|
284 | t.datetime "started_at" |
|
285 | t.datetime "started_at" |
|
285 | t.datetime "created_at", null: false |
|
286 | t.datetime "created_at", null: false |
|
286 | t.datetime "updated_at", null: false |
|
287 | t.datetime "updated_at", null: false |
|
287 | t.boolean "forced_logout" |
|
288 | t.boolean "forced_logout" |
|
288 | end |
|
289 | end |
|
289 |
|
290 | ||
|
290 | create_table "users", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
291 | create_table "users", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t| |
|
291 | t.string "login", limit: 50 |
|
292 | t.string "login", limit: 50 |
|
292 | t.string "full_name" |
|
293 | t.string "full_name" |
|
293 | t.string "hashed_password" |
|
294 | t.string "hashed_password" |
|
294 | t.string "salt", limit: 5 |
|
295 | t.string "salt", limit: 5 |
|
295 | t.string "alias" |
|
296 | t.string "alias" |
|
296 | t.string "email" |
|
297 | t.string "email" |
|
297 | t.integer "site_id" |
|
298 | t.integer "site_id" |
|
298 | t.integer "country_id" |
|
299 | t.integer "country_id" |
|
299 | t.boolean "activated", default: false |
|
300 | t.boolean "activated", default: false |
|
300 | t.datetime "created_at" |
|
301 | t.datetime "created_at" |
|
301 | t.datetime "updated_at" |
|
302 | t.datetime "updated_at" |
|
302 | t.boolean "enabled", default: true |
|
303 | t.boolean "enabled", default: true |
|
303 | t.string "remark" |
|
304 | t.string "remark" |
|
304 | t.string "last_ip" |
|
305 | t.string "last_ip" |
|
305 | t.string "section" |
|
306 | t.string "section" |
|
306 | t.integer "default_language" |
|
307 | t.integer "default_language" |
|
307 | t.index ["login"], name: "index_users_on_login", unique: true |
|
308 | t.index ["login"], name: "index_users_on_login", unique: true |
|
308 | end |
|
309 | end |
|
309 |
|
310 | ||
|
310 | add_foreign_key "problems_tags", "problems" |
|
311 | add_foreign_key "problems_tags", "problems" |
|
311 | add_foreign_key "problems_tags", "tags" |
|
312 | add_foreign_key "problems_tags", "tags" |
|
312 | end |
|
313 | end |
You need to be logged in to leave comments.
Login now