|
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
|
|
3 |
# then regenerate this schema definition.
|
|
4 |
#
|
|
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
|
|
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).
|
|
9 |
#
|
|
10 |
# It's strongly recommended to check this file into your version control system.
|
|
11 |
|
|
12 |
ActiveRecord::Schema.define(:version => 20080705072348) do
|
|
13 |
|
|
14 |
create_table "address_multi_values", :force => true do |t|
|
|
15 |
t.string "street"
|
|
16 |
t.string "city"
|
|
17 |
t.string "state"
|
|
18 |
t.string "postal_code"
|
|
19 |
t.string "country"
|
|
20 |
t.string "country_code"
|
|
21 |
t.string "phone_number"
|
|
22 |
t.string "url"
|
|
23 |
t.string "im_name"
|
|
24 |
t.string "im_service"
|
|
25 |
t.string "location"
|
|
26 |
t.integer "user_id"
|
|
27 |
t.string "type"
|
|
28 |
t.datetime "created_at"
|
|
29 |
t.datetime "updated_at"
|
|
30 |
end
|
|
31 |
|
|
32 |
create_table "attachments", :force => true do |t|
|
|
33 |
t.integer "container_id", :default => 0, :null => false
|
|
34 |
t.string "container_type", :limit => 30, :default => "", :null => false
|
|
35 |
t.string "filename", :default => "", :null => false
|
|
36 |
t.string "disk_filename", :default => "", :null => false
|
|
37 |
t.integer "filesize", :default => 0, :null => false
|
|
38 |
t.string "content_type", :default => ""
|
|
39 |
t.string "digest", :limit => 40, :default => "", :null => false
|
|
40 |
t.integer "downloads", :default => 0, :null => false
|
|
41 |
t.integer "author_id", :default => 0, :null => false
|
|
42 |
t.datetime "created_on"
|
|
43 |
t.string "description"
|
|
44 |
end
|
|
45 |
|
|
46 |
create_table "auth_sources", :force => true do |t|
|
|
47 |
t.string "type", :limit => 30, :default => "", :null => false
|
|
48 |
t.string "name", :limit => 60, :default => "", :null => false
|
|
49 |
t.string "host", :limit => 60
|
|
50 |
t.integer "port"
|
|
51 |
t.string "account"
|
|
52 |
t.string "account_password", :limit => 60
|
|
53 |
t.string "base_dn"
|
|
54 |
t.string "attr_login", :limit => 30
|
|
55 |
t.string "attr_firstname", :limit => 30
|
|
56 |
t.string "attr_lastname", :limit => 30
|
|
57 |
t.string "attr_mail", :limit => 30
|
|
58 |
t.boolean "onthefly_register", :default => false, :null => false
|
|
59 |
t.boolean "tls", :default => false, :null => false
|
|
60 |
end
|
|
61 |
|
|
62 |
create_table "boards", :force => true do |t|
|
|
63 |
t.integer "project_id", :null => false
|
|
64 |
t.string "name", :default => "", :null => false
|
|
65 |
t.string "description"
|
|
66 |
t.integer "position", :default => 1
|
|
67 |
t.integer "topics_count", :default => 0, :null => false
|
|
68 |
t.integer "messages_count", :default => 0, :null => false
|
|
69 |
t.integer "last_message_id"
|
|
70 |
end
|
|
71 |
|
|
72 |
add_index "boards", ["project_id"], :name => "altered_boards_project_id"
|
|
73 |
|
|
74 |
create_table "changes", :force => true do |t|
|
|
75 |
t.integer "changeset_id", :null => false
|
|
76 |
t.string "action", :limit => 1, :default => "", :null => false
|
|
77 |
t.string "path", :default => "", :null => false
|
|
78 |
t.string "from_path"
|
|
79 |
t.string "from_revision"
|
|
80 |
t.string "revision"
|
|
81 |
t.string "branch"
|
|
82 |
end
|
|
83 |
|
|
84 |
add_index "changes", ["changeset_id"], :name => "changesets_changeset_id"
|
|
85 |
|
|
86 |
create_table "changesets", :force => true do |t|
|
|
87 |
t.integer "repository_id", :null => false
|
|
88 |
t.string "revision", :null => false
|
|
89 |
t.string "committer"
|
|
90 |
t.datetime "committed_on", :null => false
|
|
91 |
t.text "comments"
|
|
92 |
t.date "commit_date"
|
|
93 |
t.string "scmid"
|
|
94 |
end
|
|
95 |
|
|
96 |
add_index "changesets", ["repository_id", "revision"], :name => "altered_changesets_repos_rev", :unique => true
|
|
97 |
|
|
98 |
create_table "changesets_issues", :id => false, :force => true do |t|
|
|
99 |
t.integer "changeset_id", :null => false
|
|
100 |
t.integer "issue_id", :null => false
|
|
101 |
end
|
|
102 |
|
|
103 |
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
|
104 |
|
|
105 |
create_table "comments", :force => true do |t|
|
|
106 |
t.string "commented_type", :limit => 30, :default => "", :null => false
|
|
107 |
t.integer "commented_id", :default => 0, :null => false
|
|
108 |
t.integer "author_id", :default => 0, :null => false
|
|
109 |
t.text "comments"
|
|
110 |
t.datetime "created_on", :null => false
|
|
111 |
t.datetime "updated_on", :null => false
|
|
112 |
end
|
|
113 |
|
|
114 |
create_table "custom_fields", :force => true do |t|
|
|
115 |
t.string "type", :limit => 30, :default => "", :null => false
|
|
116 |
t.string "name", :limit => 30, :default => "", :null => false
|
|
117 |
t.string "field_format", :limit => 30, :default => "", :null => false
|
|
118 |
t.text "possible_values"
|
|
119 |
t.string "regexp", :default => ""
|
|
120 |
t.integer "min_length", :default => 0, :null => false
|
|
121 |
t.integer "max_length", :default => 0, :null => false
|
|
122 |
t.boolean "is_required", :default => false, :null => false
|
|
123 |
t.boolean "is_for_all", :default => false, :null => false
|
|
124 |
t.boolean "is_filter", :default => false, :null => false
|
|
125 |
t.integer "position", :default => 1
|
|
126 |
t.boolean "searchable", :default => false
|
|
127 |
t.text "default_value"
|
|
128 |
end
|
|
129 |
|
|
130 |
create_table "custom_fields_projects", :id => false, :force => true do |t|
|
|
131 |
t.integer "custom_field_id", :default => 0, :null => false
|
|
132 |
t.integer "project_id", :default => 0, :null => false
|
|
133 |
end
|
|
134 |
|
|
135 |
create_table "custom_fields_trackers", :id => false, :force => true do |t|
|
|
136 |
t.integer "custom_field_id", :default => 0, :null => false
|
|
137 |
t.integer "tracker_id", :default => 0, :null => false
|
|
138 |
end
|
|
139 |
|
|
140 |
create_table "custom_values", :force => true do |t|
|
|
141 |
t.string "customized_type", :limit => 30, :default => "", :null => false
|
|
142 |
t.integer "customized_id", :default => 0, :null => false
|
|
143 |
t.integer "custom_field_id", :default => 0, :null => false
|
|
144 |
t.text "value"
|
|
145 |
end
|
|
146 |
|
|
147 |
add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized"
|
|
148 |
|
|
149 |
create_table "documents", :force => true do |t|
|
|
150 |
t.integer "project_id", :default => 0, :null => false
|
|
151 |
t.integer "category_id", :default => 0, :null => false
|
|
152 |
t.string "title", :limit => 60, :default => "", :null => false
|
|
153 |
t.text "description"
|
|
154 |
t.datetime "created_on"
|
|
155 |
end
|
|
156 |
|
|
157 |
add_index "documents", ["project_id"], :name => "documents_project_id"
|
|
158 |
|
|
159 |
create_table "enabled_modules", :force => true do |t|
|
|
160 |
t.integer "project_id"
|
|
161 |
t.string "name", :null => false
|
|
162 |
end
|
|
163 |
|
|
164 |
add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id"
|
|
165 |
|
|
166 |
create_table "enumerations", :force => true do |t|
|
|
167 |
t.string "opt", :limit => 4, :default => "", :null => false
|
|
168 |
t.string "name", :limit => 30, :default => "", :null => false
|
|
169 |
t.integer "position", :default => 1
|
|
170 |
t.boolean "is_default", :default => false, :null => false
|
|
171 |
end
|
|
172 |
|
|
173 |
create_table "issue_categories", :force => true do |t|
|
|
174 |
t.integer "project_id", :default => 0, :null => false
|
|
175 |
t.string "name", :limit => 30, :default => "", :null => false
|
|
176 |
t.integer "assigned_to_id"
|
|
177 |
end
|
|
178 |
|
|
179 |
add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
|
|
180 |
|
|
181 |
create_table "issue_relations", :force => true do |t|
|
|
182 |
t.integer "issue_from_id", :null => false
|
|
183 |
t.integer "issue_to_id", :null => false
|
|
184 |
t.string "relation_type", :default => "", :null => false
|
|
185 |
t.integer "delay"
|
|
186 |
end
|
|
187 |
|
|
188 |
create_table "issue_statuses", :force => true do |t|
|
|
189 |
t.string "name", :limit => 30, :default => "", :null => false
|
|
190 |
t.boolean "is_closed", :default => false, :null => false
|
|
191 |
t.boolean "is_default", :default => false, :null => false
|
|
192 |
t.integer "position", :default => 1
|
|
193 |
end
|
|
194 |
|
|
195 |
create_table "issues", :force => true do |t|
|
|
196 |
t.integer "tracker_id", :default => 0, :null => false
|
|
197 |
t.integer "project_id", :default => 0, :null => false
|
|
198 |
t.string "subject", :default => "", :null => false
|
|
199 |
t.text "description"
|
|
200 |
t.date "due_date"
|
|
201 |
t.integer "category_id"
|
|
202 |
t.integer "status_id", :default => 0, :null => false
|
|
203 |
t.integer "assigned_to_id"
|
|
204 |
t.integer "priority_id", :default => 0, :null => false
|
|
205 |
t.integer "fixed_version_id"
|
|
206 |
t.integer "author_id", :default => 0, :null => false
|
|
207 |
t.integer "lock_version", :default => 0, :null => false
|
|
208 |
t.datetime "created_on"
|
|
209 |
t.datetime "updated_on"
|
|
210 |
t.date "start_date"
|
|
211 |
t.integer "done_ratio", :default => 0, :null => false
|
|
212 |
t.float "estimated_hours"
|
|
213 |
end
|
|
214 |
|
|
215 |
add_index "issues", ["project_id"], :name => "issues_project_id"
|
|
216 |
|
|
217 |
create_table "journal_details", :force => true do |t|
|
|
218 |
t.integer "journal_id", :default => 0, :null => false
|
|
219 |
t.string "property", :limit => 30, :default => "", :null => false
|
|
220 |
t.string "prop_key", :limit => 30, :default => "", :null => false
|
|
221 |
t.string "old_value"
|
|
222 |
t.string "value"
|
|
223 |
end
|
|
224 |
|
|
225 |
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
|
|
226 |
|
|
227 |
create_table "journals", :force => true do |t|
|
|
228 |
t.integer "journalized_id", :default => 0, :null => false
|
|
229 |
t.string "journalized_type", :limit => 30, :default => "", :null => false
|
|
230 |
t.integer "user_id", :default => 0, :null => false
|
|
231 |
t.text "notes"
|
|
232 |
t.datetime "created_on", :null => false
|
|
233 |
end
|
|
234 |
|
|
235 |
add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id"
|
|
236 |
|
|
237 |
create_table "members", :force => true do |t|
|
|
238 |
t.integer "user_id", :default => 0, :null => false
|
|
239 |
t.integer "project_id", :default => 0, :null => false
|
|
240 |
t.integer "role_id", :default => 0, :null => false
|
|
241 |
t.datetime "created_on"
|
|
242 |
t.boolean "mail_notification", :default => false, :null => false
|
|
243 |
end
|
|
244 |
|
|
245 |
create_table "messages", :force => true do |t|
|
|
246 |
t.integer "board_id", :null => false
|
|
247 |
t.integer "parent_id"
|
|
248 |
t.string "subject", :default => "", :null => false
|
|
249 |
t.text "content"
|
|
250 |
t.integer "author_id"
|
|
251 |
t.integer "replies_count", :default => 0, :null => false
|
|
252 |
t.integer "last_reply_id"
|
|
253 |
t.datetime "created_on", :null => false
|
|
254 |
t.datetime "updated_on", :null => false
|
|
255 |
t.boolean "locked", :default => false
|
|
256 |
t.integer "sticky", :default => 0
|
|
257 |
end
|
|
258 |
|
|
259 |
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
|
260 |
add_index "messages", ["board_id"], :name => "messages_board_id"
|
|
261 |
|
|
262 |
create_table "news", :force => true do |t|
|
|
263 |
t.integer "project_id"
|
|
264 |
t.string "title", :limit => 60, :default => "", :null => false
|
|
265 |
t.string "summary", :default => ""
|
|
266 |
t.text "description"
|
|
267 |
t.integer "author_id", :default => 0, :null => false
|
|
268 |
t.datetime "created_on"
|
|
269 |
t.integer "comments_count", :default => 0, :null => false
|
|
270 |
end
|
|
271 |
|
|
272 |
add_index "news", ["project_id"], :name => "news_project_id"
|
|
273 |
|
|
274 |
create_table "projects", :force => true do |t|
|
|
275 |
t.string "name", :limit => 30, :default => "", :null => false
|
|
276 |
t.text "description", :limit => 255
|
|
277 |
t.string "homepage", :default => ""
|
|
278 |
t.boolean "is_public", :default => true, :null => false
|
|
279 |
t.integer "parent_id"
|
|
280 |
t.integer "projects_count", :default => 0
|
|
281 |
t.datetime "created_on"
|
|
282 |
t.datetime "updated_on"
|
|
283 |
t.string "identifier", :limit => 20
|
|
284 |
t.integer "status", :default => 1, :null => false
|
|
285 |
end
|
|
286 |
|
|
287 |
create_table "projects_trackers", :id => false, :force => true do |t|
|
|
288 |
t.integer "project_id", :default => 0, :null => false
|
|
289 |
t.integer "tracker_id", :default => 0, :null => false
|
|
290 |
end
|
|
291 |
|
|
292 |
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
|
|
293 |
|
|
294 |
create_table "queries", :force => true do |t|
|
|
295 |
t.integer "project_id"
|
|
296 |
t.string "name", :default => "", :null => false
|
|
297 |
t.text "filters"
|
|
298 |
t.integer "user_id", :default => 0, :null => false
|
|
299 |
t.boolean "is_public", :default => false, :null => false
|
|
300 |
t.text "column_names"
|
|
301 |
end
|
|
302 |
|
|
303 |
create_table "repositories", :force => true do |t|
|
|
304 |
t.integer "project_id", :default => 0, :null => false
|
|
305 |
t.string "url", :default => "", :null => false
|
|
306 |
t.string "login", :limit => 60, :default => ""
|
|
307 |
t.string "password", :limit => 60, :default => ""
|
|
308 |
t.string "root_url", :default => ""
|
|
309 |
t.string "type"
|
|
310 |
end
|
|
311 |
|
|
312 |
create_table "roles", :force => true do |t|
|
|
313 |
t.string "name", :limit => 30, :default => "", :null => false
|
|
314 |
t.integer "position", :default => 1
|
|
315 |
t.boolean "assignable", :default => true
|
|
316 |
t.integer "builtin", :default => 0, :null => false
|
|
317 |
t.text "permissions"
|
|
318 |
end
|
|
319 |
|
|
320 |
create_table "settings", :force => true do |t|
|
|
321 |
t.string "name", :limit => 30, :default => "", :null => false
|
|
322 |
t.text "value"
|
|
323 |
t.datetime "updated_on"
|
|
324 |
end
|
|
325 |
|
|
326 |
create_table "time_entries", :force => true do |t|
|
|
327 |
t.integer "project_id", :null => false
|
|
328 |
t.integer "user_id", :null => false
|
|
329 |
t.integer "issue_id"
|
|
330 |
t.float "hours", :null => false
|
|
331 |
t.string "comments"
|
|
332 |
t.integer "activity_id", :null => false
|
|
333 |
t.date "spent_on", :null => false
|
|
334 |
t.integer "tyear", :null => false
|
|
335 |
t.integer "tmonth", :null => false
|
|
336 |
t.integer "tweek", :null => false
|
|
337 |
t.datetime "created_on", :null => false
|
|
338 |
t.datetime "updated_on", :null => false
|
|
339 |
end
|
|
340 |
|
|
341 |
add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id"
|
|
342 |
add_index "time_entries", ["project_id"], :name => "time_entries_project_id"
|
|
343 |
|
|
344 |
create_table "tokens", :force => true do |t|
|
|
345 |
t.integer "user_id", :default => 0, :null => false
|
|
346 |
t.string "action", :limit => 30, :default => "", :null => false
|
|
347 |
t.string "value", :limit => 40, :default => "", :null => false
|
|
348 |
t.datetime "created_on", :null => false
|
|
349 |
end
|
|
350 |
|
|
351 |
create_table "trackers", :force => true do |t|
|
|
352 |
t.string "name", :limit => 30, :default => "", :null => false
|
|
353 |
t.boolean "is_in_chlog", :default => false, :null => false
|
|
354 |
t.integer "position", :default => 1
|
|
355 |
t.boolean "is_in_roadmap", :default => true, :null => false
|
|
356 |
end
|
|
357 |
|
|
358 |
create_table "user_preferences", :force => true do |t|
|
|
359 |
t.integer "user_id", :default => 0, :null => false
|
|
360 |
t.text "others"
|
|
361 |
t.boolean "hide_mail", :default => false
|
|
362 |
t.string "time_zone"
|
|
363 |
end
|
|
364 |
|
|
365 |
create_table "users", :force => true do |t|
|
|
366 |
t.string "login", :limit => 30, :default => "", :null => false
|
|
367 |
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
|
368 |
t.string "firstname", :limit => 30, :default => "", :null => false
|
|
369 |
t.string "lastname", :limit => 30, :default => "", :null => false
|
|
370 |
t.string "mail", :limit => 60, :default => "", :null => false
|
|
371 |
t.boolean "mail_notification", :default => true, :null => false
|
|
372 |
t.boolean "admin", :default => false, :null => false
|
|
373 |
t.integer "status", :default => 1, :null => false
|
|
374 |
t.datetime "last_login_on"
|
|
375 |
t.string "language", :limit => 5, :default => ""
|
|
376 |
t.integer "auth_source_id"
|
|
377 |
t.datetime "created_on"
|
|
378 |
t.datetime "updated_on"
|
|
379 |
t.string "type"
|
|
380 |
end
|
|
381 |
|
|
382 |
create_table "versions", :force => true do |t|
|
|
383 |
t.integer "project_id", :default => 0, :null => false
|
|
384 |
t.string "name", :default => "", :null => false
|
|
385 |
t.string "description", :default => ""
|
|
386 |
t.date "effective_date"
|
|
387 |
t.datetime "created_on"
|
|
388 |
t.datetime "updated_on"
|
|
389 |
t.string "wiki_page_title"
|
|
390 |
end
|
|
391 |
|
|
392 |
add_index "versions", ["project_id"], :name => "altered_versions_project_id"
|
|
393 |
|
|
394 |
create_table "watchers", :force => true do |t|
|
|
395 |
t.string "watchable_type", :default => "", :null => false
|
|
396 |
t.integer "watchable_id", :default => 0, :null => false
|
|
397 |
t.integer "user_id"
|
|
398 |
end
|
|
399 |
|
|
400 |
create_table "wiki_content_versions", :force => true do |t|
|
|
401 |
t.integer "wiki_content_id", :null => false
|
|
402 |
t.integer "page_id", :null => false
|
|
403 |
t.integer "author_id"
|
|
404 |
t.binary "data"
|
|
405 |
t.string "compression", :limit => 6, :default => ""
|
|
406 |
t.string "comments", :default => ""
|
|
407 |
t.datetime "updated_on", :null => false
|
|
408 |
t.integer "version", :null => false
|
|
409 |
end
|
|
410 |
|
|
411 |
add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid"
|
|
412 |
|
|
413 |
create_table "wiki_contents", :force => true do |t|
|
|
414 |
t.integer "page_id", :null => false
|
|
415 |
t.integer "author_id"
|
|
416 |
t.text "text"
|
|
417 |
t.string "comments", :default => ""
|
|
418 |
t.datetime "updated_on", :null => false
|
|
419 |
t.integer "version", :null => false
|
|
420 |
end
|
|
421 |
|
|
422 |
add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id"
|
|
423 |
|
|
424 |
create_table "wiki_pages", :force => true do |t|
|
|
425 |
t.integer "wiki_id", :null => false
|
|
426 |
t.string "title", :null => false
|
|
427 |
t.datetime "created_on", :null => false
|
|
428 |
t.boolean "protected", :default => false, :null => false
|
|
429 |
end
|
|
430 |
|
|
431 |
add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title"
|
|
432 |
|
|
433 |
create_table "wiki_redirects", :force => true do |t|
|
|
434 |
t.integer "wiki_id", :null => false
|
|
435 |
t.string "title"
|
|
436 |
t.string "redirects_to"
|
|
437 |
t.datetime "created_on", :null => false
|
|
438 |
end
|
|
439 |
|
|
440 |
add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title"
|
|
441 |
|
|
442 |
create_table "wikis", :force => true do |t|
|
|
443 |
t.integer "project_id", :null => false
|
|
444 |
t.string "start_page", :null => false
|
|
445 |
t.integer "status", :default => 1, :null => false
|
|
446 |
end
|
|
447 |
|
|
448 |
add_index "wikis", ["project_id"], :name => "wikis_project_id"
|
|
449 |
|
|
450 |
create_table "workflows", :force => true do |t|
|
|
451 |
t.integer "tracker_id", :default => 0, :null => false
|
|
452 |
t.integer "old_status_id", :default => 0, :null => false
|
|
453 |
t.integer "new_status_id", :default => 0, :null => false
|
|
454 |
t.integer "role_id", :default => 0, :null => false
|
|
455 |
end
|
|
456 |
|
|
457 |
add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status"
|
|
458 |
|
|
459 |
end
|