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