Description:
updated db/schema.rb: removed unused tables
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r277:f3c97d6285dc - - 3 files changed: 10 inserted, 34 deleted

@@ -1,80 +1,72
1 # This file is auto-generated from the current state of the database. Instead of editing this file,
1 # This file is auto-generated from the current state of the database. Instead of editing this file,
2 # please use the migrations feature of Active Record to incrementally modify your database, and
2 # please use the migrations feature of Active Record to incrementally modify your database, and
3 # then regenerate this schema definition.
3 # then regenerate this schema definition.
4 #
4 #
5 # Note that this schema.rb definition is the authoritative source for your database schema. If you need
5 # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6 # to create the application database on another system, you should be using db:schema:load, not running
6 # to create the application database on another system, you should be using db:schema:load, not running
7 # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
7 # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8 # you'll amass, the slower it'll run and the greater likelihood for issues).
8 # you'll amass, the slower it'll run and the greater likelihood for issues).
9 #
9 #
10 # It's strongly recommended to check this file into your version control system.
10 # It's strongly recommended to check this file into your version control system.
11
11
12 ActiveRecord::Schema.define(:version => 20100219014840) do
12 ActiveRecord::Schema.define(:version => 20100219014840) do
13
13
14 create_table "announcements", :force => true do |t|
14 create_table "announcements", :force => true do |t|
15 t.string "author"
15 t.string "author"
16 t.text "body"
16 t.text "body"
17 t.boolean "published"
17 t.boolean "published"
18 t.datetime "created_at"
18 t.datetime "created_at"
19 t.datetime "updated_at"
19 t.datetime "updated_at"
20 t.boolean "frontpage", :default => false
20 t.boolean "frontpage", :default => false
21 t.boolean "contest_only", :default => false
21 t.boolean "contest_only", :default => false
22 t.string "title"
22 t.string "title"
23 end
23 end
24
24
25 - create_table "codejom_statuses", :force => true do |t|
26 - t.integer "user_id"
27 - t.boolean "alive"
28 - t.integer "num_problems_passed"
29 - t.datetime "created_at"
30 - t.datetime "updated_at"
31 - end
32 -
33 create_table "configurations", :force => true do |t|
25 create_table "configurations", :force => true do |t|
34 t.string "key"
26 t.string "key"
35 t.string "value_type"
27 t.string "value_type"
36 t.string "value"
28 t.string "value"
37 t.datetime "created_at"
29 t.datetime "created_at"
38 t.datetime "updated_at"
30 t.datetime "updated_at"
39 t.text "description"
31 t.text "description"
40 end
32 end
41
33
42 create_table "contests", :force => true do |t|
34 create_table "contests", :force => true do |t|
43 t.string "title"
35 t.string "title"
44 t.boolean "enabled"
36 t.boolean "enabled"
45 t.datetime "created_at"
37 t.datetime "created_at"
46 t.datetime "updated_at"
38 t.datetime "updated_at"
47 end
39 end
48
40
49 create_table "contests_problems", :id => false, :force => true do |t|
41 create_table "contests_problems", :id => false, :force => true do |t|
50 t.integer "contest_id"
42 t.integer "contest_id"
51 t.integer "problem_id"
43 t.integer "problem_id"
52 end
44 end
53
45
54 create_table "contests_users", :id => false, :force => true do |t|
46 create_table "contests_users", :id => false, :force => true do |t|
55 t.integer "contest_id"
47 t.integer "contest_id"
56 t.integer "user_id"
48 t.integer "user_id"
57 end
49 end
58
50
59 create_table "countries", :force => true do |t|
51 create_table "countries", :force => true do |t|
60 t.string "name"
52 t.string "name"
61 t.datetime "created_at"
53 t.datetime "created_at"
62 t.datetime "updated_at"
54 t.datetime "updated_at"
63 end
55 end
64
56
65 create_table "descriptions", :force => true do |t|
57 create_table "descriptions", :force => true do |t|
66 t.text "body"
58 t.text "body"
67 t.boolean "markdowned"
59 t.boolean "markdowned"
68 t.datetime "created_at"
60 t.datetime "created_at"
69 t.datetime "updated_at"
61 t.datetime "updated_at"
70 end
62 end
71
63
72 create_table "grader_processes", :force => true do |t|
64 create_table "grader_processes", :force => true do |t|
73 t.string "host", :limit => 20
65 t.string "host", :limit => 20
74 t.integer "pid"
66 t.integer "pid"
75 t.string "mode"
67 t.string "mode"
76 t.boolean "active"
68 t.boolean "active"
77 t.datetime "created_at"
69 t.datetime "created_at"
78 t.datetime "updated_at"
70 t.datetime "updated_at"
79 t.integer "task_id"
71 t.integer "task_id"
80 t.string "task_type"
72 t.string "task_type"
@@ -111,142 +103,122
111 t.boolean "test_allowed"
103 t.boolean "test_allowed"
112 t.boolean "output_only"
104 t.boolean "output_only"
113 t.string "description_filename"
105 t.string "description_filename"
114 end
106 end
115
107
116 create_table "rights", :force => true do |t|
108 create_table "rights", :force => true do |t|
117 t.string "name"
109 t.string "name"
118 t.string "controller"
110 t.string "controller"
119 t.string "action"
111 t.string "action"
120 end
112 end
121
113
122 create_table "rights_roles", :id => false, :force => true do |t|
114 create_table "rights_roles", :id => false, :force => true do |t|
123 t.integer "right_id"
115 t.integer "right_id"
124 t.integer "role_id"
116 t.integer "role_id"
125 end
117 end
126
118
127 add_index "rights_roles", ["role_id"], :name => "index_rights_roles_on_role_id"
119 add_index "rights_roles", ["role_id"], :name => "index_rights_roles_on_role_id"
128
120
129 create_table "roles", :force => true do |t|
121 create_table "roles", :force => true do |t|
130 t.string "name"
122 t.string "name"
131 end
123 end
132
124
133 create_table "roles_users", :id => false, :force => true do |t|
125 create_table "roles_users", :id => false, :force => true do |t|
134 t.integer "role_id"
126 t.integer "role_id"
135 t.integer "user_id"
127 t.integer "user_id"
136 end
128 end
137
129
138 add_index "roles_users", ["user_id"], :name => "index_roles_users_on_user_id"
130 add_index "roles_users", ["user_id"], :name => "index_roles_users_on_user_id"
139
131
140 create_table "sessions", :force => true do |t|
132 create_table "sessions", :force => true do |t|
141 t.string "session_id"
133 t.string "session_id"
142 t.text "data"
134 t.text "data"
143 t.datetime "updated_at"
135 t.datetime "updated_at"
144 end
136 end
145
137
146 add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
138 add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
147 add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
139 add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
148
140
149 create_table "sites", :force => true do |t|
141 create_table "sites", :force => true do |t|
150 t.string "name"
142 t.string "name"
151 t.boolean "started"
143 t.boolean "started"
152 t.datetime "start_time"
144 t.datetime "start_time"
153 t.datetime "created_at"
145 t.datetime "created_at"
154 t.datetime "updated_at"
146 t.datetime "updated_at"
155 t.integer "country_id"
147 t.integer "country_id"
156 t.string "password"
148 t.string "password"
157 end
149 end
158
150
159 - create_table "submission_statuses", :force => true do |t|
160 - t.integer "user_id"
161 - t.integer "problem_id"
162 - t.boolean "passed"
163 - t.integer "submission_count"
164 - t.datetime "created_at"
165 - t.datetime "updated_at"
166 - end
167 -
168 create_table "submissions", :force => true do |t|
151 create_table "submissions", :force => true do |t|
169 t.integer "user_id"
152 t.integer "user_id"
170 t.integer "problem_id"
153 t.integer "problem_id"
171 t.integer "language_id"
154 t.integer "language_id"
172 t.text "source"
155 t.text "source"
173 t.binary "binary"
156 t.binary "binary"
174 t.datetime "submitted_at"
157 t.datetime "submitted_at"
175 t.datetime "compiled_at"
158 t.datetime "compiled_at"
176 t.text "compiler_message"
159 t.text "compiler_message"
177 t.datetime "graded_at"
160 t.datetime "graded_at"
178 t.integer "points"
161 t.integer "points"
179 t.text "grader_comment"
162 t.text "grader_comment"
180 t.integer "number"
163 t.integer "number"
181 t.string "source_filename"
164 t.string "source_filename"
182 end
165 end
183
166
184 add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true
167 add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true
185 add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id"
168 add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id"
186
169
187 create_table "tasks", :force => true do |t|
170 create_table "tasks", :force => true do |t|
188 t.integer "submission_id"
171 t.integer "submission_id"
189 t.datetime "created_at"
172 t.datetime "created_at"
190 t.integer "status"
173 t.integer "status"
191 t.datetime "updated_at"
174 t.datetime "updated_at"
192 end
175 end
193
176
194 - create_table "test_pair_assignments", :force => true do |t|
195 - t.integer "user_id"
196 - t.integer "problem_id"
197 - t.integer "test_pair_id"
198 - t.integer "test_pair_number"
199 - t.integer "request_number"
200 - t.datetime "created_at"
201 - t.datetime "updated_at"
202 - t.boolean "submitted"
203 - end
204 -
205 create_table "test_pairs", :force => true do |t|
177 create_table "test_pairs", :force => true do |t|
206 t.integer "problem_id"
178 t.integer "problem_id"
207 t.text "input", :limit => 16777215
179 t.text "input", :limit => 16777215
208 t.text "solution", :limit => 16777215
180 t.text "solution", :limit => 16777215
209 t.datetime "created_at"
181 t.datetime "created_at"
210 t.datetime "updated_at"
182 t.datetime "updated_at"
211 end
183 end
212
184
213 create_table "test_requests", :force => true do |t|
185 create_table "test_requests", :force => true do |t|
214 t.integer "user_id"
186 t.integer "user_id"
215 t.integer "problem_id"
187 t.integer "problem_id"
216 t.integer "submission_id"
188 t.integer "submission_id"
217 t.string "input_file_name"
189 t.string "input_file_name"
218 t.string "output_file_name"
190 t.string "output_file_name"
219 t.string "running_stat"
191 t.string "running_stat"
220 t.integer "status"
192 t.integer "status"
221 t.datetime "updated_at"
193 t.datetime "updated_at"
222 t.datetime "submitted_at"
194 t.datetime "submitted_at"
223 t.datetime "compiled_at"
195 t.datetime "compiled_at"
224 t.text "compiler_message"
196 t.text "compiler_message"
225 t.datetime "graded_at"
197 t.datetime "graded_at"
226 t.string "grader_comment"
198 t.string "grader_comment"
227 t.datetime "created_at"
199 t.datetime "created_at"
228 t.float "running_time"
200 t.float "running_time"
229 t.string "exit_status"
201 t.string "exit_status"
230 t.integer "memory_usage"
202 t.integer "memory_usage"
231 end
203 end
232
204
233 add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id"
205 add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id"
234
206
235 create_table "user_contest_stats", :force => true do |t|
207 create_table "user_contest_stats", :force => true do |t|
236 t.integer "user_id"
208 t.integer "user_id"
237 t.datetime "started_at"
209 t.datetime "started_at"
238 t.datetime "created_at"
210 t.datetime "created_at"
239 t.datetime "updated_at"
211 t.datetime "updated_at"
240 end
212 end
241
213
242 create_table "users", :force => true do |t|
214 create_table "users", :force => true do |t|
243 t.string "login", :limit => 50
215 t.string "login", :limit => 50
244 t.string "full_name"
216 t.string "full_name"
245 t.string "hashed_password"
217 t.string "hashed_password"
246 t.string "salt", :limit => 5
218 t.string "salt", :limit => 5
247 t.string "alias"
219 t.string "alias"
248 t.string "email"
220 t.string "email"
249 t.integer "site_id"
221 t.integer "site_id"
250 t.integer "country_id"
222 t.integer "country_id"
251 t.boolean "activated", :default => false
223 t.boolean "activated", :default => false
252 t.datetime "created_at"
224 t.datetime "created_at"
@@ -1,9 +1,13
1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
2
3 - one:
3 + contest_a:
4 - title: MyString
4 + title: Contest A
5 - enabled: false
5 + enabled: true
6
6
7 - two:
7 + contest_b:
8 - title: MyString
8 + title: Contest B
9 + enabled: true
10 +
11 + contest_c:
12 + title: Contest C
9 enabled: false
13 enabled: false
@@ -1,29 +1,29
1 ENV["RAILS_ENV"] = "test"
1 ENV["RAILS_ENV"] = "test"
2 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
2 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3 require 'test_help'
3 require 'test_help'
4
4
5 class ActiveSupport::TestCase
5 class ActiveSupport::TestCase
6 # Transactional fixtures accelerate your tests by wrapping each test method
6 # Transactional fixtures accelerate your tests by wrapping each test method
7 # in a transaction that's rolled back on completion. This ensures that the
7 # in a transaction that's rolled back on completion. This ensures that the
8 # test database remains unchanged so your fixtures don't have to be reloaded
8 # test database remains unchanged so your fixtures don't have to be reloaded
9 # between every test method. Fewer database queries means faster tests.
9 # between every test method. Fewer database queries means faster tests.
10 #
10 #
11 # Read Mike Clark's excellent walkthrough at
11 # Read Mike Clark's excellent walkthrough at
12 # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
12 # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
13 #
13 #
14 # Every Active Record database supports transactions except MyISAM tables
14 # Every Active Record database supports transactions except MyISAM tables
15 # in MySQL. Turn off transactional fixtures in this case; however, if you
15 # in MySQL. Turn off transactional fixtures in this case; however, if you
16 # don't care one way or the other, switching from MyISAM to InnoDB tables
16 # don't care one way or the other, switching from MyISAM to InnoDB tables
17 # is recommended.
17 # is recommended.
18
18
19 - self.use_transactional_fixtures = false
19 + self.use_transactional_fixtures = true
20
20
21 # Instantiated fixtures are slow, but give you @david where otherwise you
21 # Instantiated fixtures are slow, but give you @david where otherwise you
22 # would need people(:david). If you don't want to migrate your existing
22 # would need people(:david). If you don't want to migrate your existing
23 # test cases which use the @david style and don't mind the speed hit (each
23 # test cases which use the @david style and don't mind the speed hit (each
24 # instantiated fixtures translates to a database query per test method),
24 # instantiated fixtures translates to a database query per test method),
25 # then set this back to true.
25 # then set this back to true.
26 self.use_instantiated_fixtures = false
26 self.use_instantiated_fixtures = false
27
27
28 # Add more helper methods to be used by all tests here...
28 # Add more helper methods to be used by all tests here...
29 end
29 end
You need to be logged in to leave comments. Login now