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