Project

General

Profile

Patch #11615 ยป db_schema_and_seeds.diff

Alexander Markelov, 2012-08-09 21:58

View differences:

db/schema.rb (revision 0)
1
# encoding: UTF-8
2
# This file is auto-generated from the current state of the database. Instead
3
# of editing this file, please use the migrations feature of Active Record to
4
# incrementally modify your database, and then regenerate this schema definition.
5
#
6
# Note that this schema.rb definition is the authoritative source for your
7
# database schema. If you need to create the application database on another
8
# system, you should be using db:schema:load, not running all the migrations
9
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
# you'll amass, the slower it'll run and the greater likelihood for issues).
11
#
12
# It's strongly recommended to check this file into your version control system.
13

  
14
ActiveRecord::Schema.define(:version => 20120731164049) do
15

  
16
  create_table "attachments", :force => true do |t|
17
    t.integer  "container_id"
18
    t.string   "container_type", :limit => 30
19
    t.string   "filename",                     :default => "", :null => false
20
    t.string   "disk_filename",                :default => "", :null => false
21
    t.integer  "filesize",                     :default => 0,  :null => false
22
    t.string   "content_type",                 :default => ""
23
    t.string   "digest",         :limit => 40, :default => "", :null => false
24
    t.integer  "downloads",                    :default => 0,  :null => false
25
    t.integer  "author_id",                    :default => 0,  :null => false
26
    t.datetime "created_on"
27
    t.string   "description"
28
  end
29

  
30
  add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id"
31
  add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type"
32
  add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on"
33

  
34
  create_table "auth_sources", :force => true do |t|
35
    t.string  "type",              :limit => 30, :default => "",    :null => false
36
    t.string  "name",              :limit => 60, :default => "",    :null => false
37
    t.string  "host",              :limit => 60
38
    t.integer "port"
39
    t.string  "account"
40
    t.string  "account_password",                :default => ""
41
    t.string  "base_dn"
42
    t.string  "attr_login",        :limit => 30
43
    t.string  "attr_firstname",    :limit => 30
44
    t.string  "attr_lastname",     :limit => 30
45
    t.string  "attr_mail",         :limit => 30
46
    t.boolean "onthefly_register",               :default => false, :null => false
47
    t.boolean "tls",                             :default => false, :null => false
48
    t.string  "filter"
49
    t.integer "timeout"
50
  end
51

  
52
  add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type"
53

  
54
  create_table "boards", :force => true do |t|
55
    t.integer "project_id",                      :null => false
56
    t.string  "name",            :default => "", :null => false
57
    t.string  "description"
58
    t.integer "position",        :default => 1
59
    t.integer "topics_count",    :default => 0,  :null => false
60
    t.integer "messages_count",  :default => 0,  :null => false
61
    t.integer "last_message_id"
62
    t.integer "parent_id"
63
  end
64

  
65
  add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
66
  add_index "boards", ["project_id"], :name => "boards_project_id"
67

  
68
  create_table "changes", :force => true do |t|
69
    t.integer "changeset_id",                               :null => false
70
    t.string  "action",        :limit => 1, :default => "", :null => false
71
    t.text    "path",                                       :null => false
72
    t.text    "from_path"
73
    t.string  "from_revision"
74
    t.string  "revision"
75
    t.string  "branch"
76
  end
77

  
78
  add_index "changes", ["changeset_id"], :name => "changesets_changeset_id"
79

  
80
  create_table "changeset_parents", :id => false, :force => true do |t|
81
    t.integer "changeset_id", :null => false
82
    t.integer "parent_id",    :null => false
83
  end
84

  
85
  add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids"
86
  add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids"
87

  
88
  create_table "changesets", :force => true do |t|
89
    t.integer  "repository_id", :null => false
90
    t.string   "revision",      :null => false
91
    t.string   "committer"
92
    t.datetime "committed_on",  :null => false
93
    t.text     "comments"
94
    t.date     "commit_date"
95
    t.string   "scmid"
96
    t.integer  "user_id"
97
  end
98

  
99
  add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
100
  add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true
101
  add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid"
102
  add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id"
103
  add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id"
104

  
105
  create_table "changesets_issues", :id => false, :force => true do |t|
106
    t.integer "changeset_id", :null => false
107
    t.integer "issue_id",     :null => false
108
  end
109

  
110
  add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
111

  
112
  create_table "comments", :force => true do |t|
113
    t.string   "commented_type", :limit => 30, :default => "", :null => false
114
    t.integer  "commented_id",                 :default => 0,  :null => false
115
    t.integer  "author_id",                    :default => 0,  :null => false
116
    t.text     "comments"
117
    t.datetime "created_on",                                   :null => false
118
    t.datetime "updated_on",                                   :null => false
119
  end
120

  
121
  add_index "comments", ["author_id"], :name => "index_comments_on_author_id"
122
  add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type"
123

  
124
  create_table "custom_fields", :force => true do |t|
125
    t.string  "type",            :limit => 30, :default => "",    :null => false
126
    t.string  "name",            :limit => 30, :default => "",    :null => false
127
    t.string  "field_format",    :limit => 30, :default => "",    :null => false
128
    t.text    "possible_values"
129
    t.string  "regexp",                        :default => ""
130
    t.integer "min_length",                    :default => 0,     :null => false
131
    t.integer "max_length",                    :default => 0,     :null => false
132
    t.boolean "is_required",                   :default => false, :null => false
133
    t.boolean "is_for_all",                    :default => false, :null => false
134
    t.boolean "is_filter",                     :default => false, :null => false
135
    t.integer "position",                      :default => 1
136
    t.boolean "searchable",                    :default => false
137
    t.text    "default_value"
138
    t.boolean "editable",                      :default => true
139
    t.boolean "visible",                       :default => true,  :null => false
140
    t.boolean "multiple",                      :default => false
141
  end
142

  
143
  add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type"
144

  
145
  create_table "custom_fields_projects", :id => false, :force => true do |t|
146
    t.integer "custom_field_id", :default => 0, :null => false
147
    t.integer "project_id",      :default => 0, :null => false
148
  end
149

  
150
  add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id"
151

  
152
  create_table "custom_fields_trackers", :id => false, :force => true do |t|
153
    t.integer "custom_field_id", :default => 0, :null => false
154
    t.integer "tracker_id",      :default => 0, :null => false
155
  end
156

  
157
  add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id"
158

  
159
  create_table "custom_values", :force => true do |t|
160
    t.string  "customized_type", :limit => 30, :default => "", :null => false
161
    t.integer "customized_id",                 :default => 0,  :null => false
162
    t.integer "custom_field_id",               :default => 0,  :null => false
163
    t.text    "value"
164
  end
165

  
166
  add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id"
167
  add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized"
168

  
169
  create_table "documents", :force => true do |t|
170
    t.integer  "project_id",                :default => 0,  :null => false
171
    t.integer  "category_id",               :default => 0,  :null => false
172
    t.string   "title",       :limit => 60, :default => "", :null => false
173
    t.text     "description"
174
    t.datetime "created_on"
175
  end
176

  
177
  add_index "documents", ["category_id"], :name => "index_documents_on_category_id"
178
  add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
179
  add_index "documents", ["project_id"], :name => "documents_project_id"
180

  
181
  create_table "enabled_modules", :force => true do |t|
182
    t.integer "project_id"
183
    t.string  "name",       :null => false
184
  end
185

  
186
  add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id"
187

  
188
  create_table "enumerations", :force => true do |t|
189
    t.string  "name",       :limit => 30, :default => "",    :null => false
190
    t.integer "position",                 :default => 1
191
    t.boolean "is_default",               :default => false, :null => false
192
    t.string  "type"
193
    t.boolean "active",                   :default => true,  :null => false
194
    t.integer "project_id"
195
    t.integer "parent_id"
196
  end
197

  
198
  add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type"
199
  add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id"
200

  
201
  create_table "groups_users", :id => false, :force => true do |t|
202
    t.integer "group_id", :null => false
203
    t.integer "user_id",  :null => false
204
  end
205

  
206
  add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true
207

  
208
  create_table "issue_categories", :force => true do |t|
209
    t.integer "project_id",                   :default => 0,  :null => false
210
    t.string  "name",           :limit => 30, :default => "", :null => false
211
    t.integer "assigned_to_id"
212
  end
213

  
214
  add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id"
215
  add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
216

  
217
  create_table "issue_relations", :force => true do |t|
218
    t.integer "issue_from_id",                 :null => false
219
    t.integer "issue_to_id",                   :null => false
220
    t.string  "relation_type", :default => "", :null => false
221
    t.integer "delay"
222
  end
223

  
224
  add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true
225
  add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id"
226
  add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id"
227

  
228
  create_table "issue_statuses", :force => true do |t|
229
    t.string  "name",               :limit => 30, :default => "",    :null => false
230
    t.boolean "is_closed",                        :default => false, :null => false
231
    t.boolean "is_default",                       :default => false, :null => false
232
    t.integer "position",                         :default => 1
233
    t.integer "default_done_ratio"
234
  end
235

  
236
  add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed"
237
  add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default"
238
  add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position"
239

  
240
  create_table "issues", :force => true do |t|
241
    t.integer  "tracker_id",       :default => 0,     :null => false
242
    t.integer  "project_id",       :default => 0,     :null => false
243
    t.string   "subject",          :default => "",    :null => false
244
    t.text     "description"
245
    t.date     "due_date"
246
    t.integer  "category_id"
247
    t.integer  "status_id",        :default => 0,     :null => false
248
    t.integer  "assigned_to_id"
249
    t.integer  "priority_id",      :default => 0,     :null => false
250
    t.integer  "fixed_version_id"
251
    t.integer  "author_id",        :default => 0,     :null => false
252
    t.integer  "lock_version",     :default => 0,     :null => false
253
    t.datetime "created_on"
254
    t.datetime "updated_on"
255
    t.date     "start_date"
256
    t.integer  "done_ratio",       :default => 0,     :null => false
257
    t.float    "estimated_hours"
258
    t.integer  "parent_id"
259
    t.integer  "root_id"
260
    t.integer  "lft"
261
    t.integer  "rgt"
262
    t.boolean  "is_private",       :default => false, :null => false
263
  end
264

  
265
  add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id"
266
  add_index "issues", ["author_id"], :name => "index_issues_on_author_id"
267
  add_index "issues", ["category_id"], :name => "index_issues_on_category_id"
268
  add_index "issues", ["created_on"], :name => "index_issues_on_created_on"
269
  add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id"
270
  add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id"
271
  add_index "issues", ["project_id"], :name => "issues_project_id"
272
  add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt"
273
  add_index "issues", ["status_id"], :name => "index_issues_on_status_id"
274
  add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id"
275

  
276
  create_table "journal_details", :force => true do |t|
277
    t.integer "journal_id",               :default => 0,  :null => false
278
    t.string  "property",   :limit => 30, :default => "", :null => false
279
    t.string  "prop_key",   :limit => 30, :default => "", :null => false
280
    t.text    "old_value"
281
    t.text    "value"
282
  end
283

  
284
  add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
285

  
286
  create_table "journals", :force => true do |t|
287
    t.integer  "journalized_id",                 :default => 0,  :null => false
288
    t.string   "journalized_type", :limit => 30, :default => "", :null => false
289
    t.integer  "user_id",                        :default => 0,  :null => false
290
    t.text     "notes"
291
    t.datetime "created_on",                                     :null => false
292
  end
293

  
294
  add_index "journals", ["created_on"], :name => "index_journals_on_created_on"
295
  add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id"
296
  add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id"
297
  add_index "journals", ["user_id"], :name => "index_journals_on_user_id"
298

  
299
  create_table "member_roles", :force => true do |t|
300
    t.integer "member_id",      :null => false
301
    t.integer "role_id",        :null => false
302
    t.integer "inherited_from"
303
  end
304

  
305
  add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id"
306
  add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id"
307

  
308
  create_table "members", :force => true do |t|
309
    t.integer  "user_id",           :default => 0,     :null => false
310
    t.integer  "project_id",        :default => 0,     :null => false
311
    t.datetime "created_on"
312
    t.boolean  "mail_notification", :default => false, :null => false
313
  end
314

  
315
  add_index "members", ["project_id"], :name => "index_members_on_project_id"
316
  add_index "members", ["user_id", "project_id"], :name => "index_members_on_user_id_and_project_id", :unique => true
317
  add_index "members", ["user_id"], :name => "index_members_on_user_id"
318

  
319
  create_table "messages", :force => true do |t|
320
    t.integer  "board_id",                         :null => false
321
    t.integer  "parent_id"
322
    t.string   "subject",       :default => "",    :null => false
323
    t.text     "content"
324
    t.integer  "author_id"
325
    t.integer  "replies_count", :default => 0,     :null => false
326
    t.integer  "last_reply_id"
327
    t.datetime "created_on",                       :null => false
328
    t.datetime "updated_on",                       :null => false
329
    t.boolean  "locked",        :default => false
330
    t.integer  "sticky",        :default => 0
331
  end
332

  
333
  add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
334
  add_index "messages", ["board_id"], :name => "messages_board_id"
335
  add_index "messages", ["created_on"], :name => "index_messages_on_created_on"
336
  add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id"
337
  add_index "messages", ["parent_id"], :name => "messages_parent_id"
338

  
339
  create_table "news", :force => true do |t|
340
    t.integer  "project_id"
341
    t.string   "title",          :limit => 60, :default => "", :null => false
342
    t.string   "summary",                      :default => ""
343
    t.text     "description"
344
    t.integer  "author_id",                    :default => 0,  :null => false
345
    t.datetime "created_on"
346
    t.integer  "comments_count",               :default => 0,  :null => false
347
  end
348

  
349
  add_index "news", ["author_id"], :name => "index_news_on_author_id"
350
  add_index "news", ["created_on"], :name => "index_news_on_created_on"
351
  add_index "news", ["project_id"], :name => "news_project_id"
352

  
353
  create_table "open_id_authentication_associations", :force => true do |t|
354
    t.integer "issued"
355
    t.integer "lifetime"
356
    t.string  "handle"
357
    t.string  "assoc_type"
358
    t.binary  "server_url"
359
    t.binary  "secret"
360
  end
361

  
362
  create_table "open_id_authentication_nonces", :force => true do |t|
363
    t.integer "timestamp",  :null => false
364
    t.string  "server_url"
365
    t.string  "salt",       :null => false
366
  end
367

  
368
  create_table "projects", :force => true do |t|
369
    t.string   "name",        :default => "",   :null => false
370
    t.text     "description"
371
    t.string   "homepage",    :default => ""
372
    t.boolean  "is_public",   :default => true, :null => false
373
    t.integer  "parent_id"
374
    t.datetime "created_on"
375
    t.datetime "updated_on"
376
    t.string   "identifier"
377
    t.integer  "status",      :default => 1,    :null => false
378
    t.integer  "lft"
379
    t.integer  "rgt"
380
  end
381

  
382
  add_index "projects", ["lft"], :name => "index_projects_on_lft"
383
  add_index "projects", ["rgt"], :name => "index_projects_on_rgt"
384

  
385
  create_table "projects_trackers", :id => false, :force => true do |t|
386
    t.integer "project_id", :default => 0, :null => false
387
    t.integer "tracker_id", :default => 0, :null => false
388
  end
389

  
390
  add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
391
  add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
392

  
393
  create_table "queries", :force => true do |t|
394
    t.integer "project_id"
395
    t.string  "name",          :default => "",    :null => false
396
    t.text    "filters"
397
    t.integer "user_id",       :default => 0,     :null => false
398
    t.boolean "is_public",     :default => false, :null => false
399
    t.text    "column_names"
400
    t.text    "sort_criteria"
401
    t.string  "group_by"
402
  end
403

  
404
  add_index "queries", ["project_id"], :name => "index_queries_on_project_id"
405
  add_index "queries", ["user_id"], :name => "index_queries_on_user_id"
406

  
407
  create_table "repositories", :force => true do |t|
408
    t.integer "project_id",                  :default => 0,     :null => false
409
    t.string  "url",                         :default => "",    :null => false
410
    t.string  "login",         :limit => 60, :default => ""
411
    t.string  "password",                    :default => ""
412
    t.string  "root_url",                    :default => ""
413
    t.string  "type"
414
    t.string  "path_encoding", :limit => 64
415
    t.string  "log_encoding",  :limit => 64
416
    t.text    "extra_info"
417
    t.string  "identifier"
418
    t.boolean "is_default",                  :default => false
419
  end
420

  
421
  add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
422

  
423
  create_table "roles", :force => true do |t|
424
    t.string  "name",              :limit => 30, :default => "",        :null => false
425
    t.integer "position",                        :default => 1
426
    t.boolean "assignable",                      :default => true
427
    t.integer "builtin",                         :default => 0,         :null => false
428
    t.text    "permissions"
429
    t.string  "issues_visibility", :limit => 30, :default => "default", :null => false
430
  end
431

  
432
  create_table "settings", :force => true do |t|
433
    t.string   "name",       :default => "", :null => false
434
    t.text     "value"
435
    t.datetime "updated_on"
436
  end
437

  
438
  add_index "settings", ["name"], :name => "index_settings_on_name"
439

  
440
  create_table "time_entries", :force => true do |t|
441
    t.integer  "project_id",  :null => false
442
    t.integer  "user_id",     :null => false
443
    t.integer  "issue_id"
444
    t.float    "hours",       :null => false
445
    t.string   "comments"
446
    t.integer  "activity_id", :null => false
447
    t.date     "spent_on",    :null => false
448
    t.integer  "tyear",       :null => false
449
    t.integer  "tmonth",      :null => false
450
    t.integer  "tweek",       :null => false
451
    t.datetime "created_on",  :null => false
452
    t.datetime "updated_on",  :null => false
453
  end
454

  
455
  add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id"
456
  add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on"
457
  add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id"
458
  add_index "time_entries", ["project_id"], :name => "time_entries_project_id"
459
  add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id"
460

  
461
  create_table "tokens", :force => true do |t|
462
    t.integer  "user_id",                  :default => 0,  :null => false
463
    t.string   "action",     :limit => 30, :default => "", :null => false
464
    t.string   "value",      :limit => 40, :default => "", :null => false
465
    t.datetime "created_on",                               :null => false
466
  end
467

  
468
  add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id"
469

  
470
  create_table "trackers", :force => true do |t|
471
    t.string  "name",          :limit => 30, :default => "",    :null => false
472
    t.boolean "is_in_chlog",                 :default => false, :null => false
473
    t.integer "position",                    :default => 1
474
    t.boolean "is_in_roadmap",               :default => true,  :null => false
475
    t.integer "fields_bits",                 :default => 0
476
  end
477

  
478
  create_table "user_preferences", :force => true do |t|
479
    t.integer "user_id",   :default => 0,     :null => false
480
    t.text    "others"
481
    t.boolean "hide_mail", :default => false
482
    t.string  "time_zone"
483
  end
484

  
485
  add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
486

  
487
  create_table "users", :force => true do |t|
488
    t.string   "login",                           :default => "",    :null => false
489
    t.string   "hashed_password",   :limit => 40, :default => "",    :null => false
490
    t.string   "firstname",         :limit => 30, :default => "",    :null => false
491
    t.string   "lastname",          :limit => 30, :default => "",    :null => false
492
    t.string   "mail",              :limit => 60, :default => "",    :null => false
493
    t.boolean  "admin",                           :default => false, :null => false
494
    t.integer  "status",                          :default => 1,     :null => false
495
    t.datetime "last_login_on"
496
    t.string   "language",          :limit => 5,  :default => ""
497
    t.integer  "auth_source_id"
498
    t.datetime "created_on"
499
    t.datetime "updated_on"
500
    t.string   "type"
501
    t.string   "identity_url"
502
    t.string   "mail_notification",               :default => "",    :null => false
503
    t.string   "salt",              :limit => 64
504
  end
505

  
506
  add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
507
  add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
508
  add_index "users", ["type"], :name => "index_users_on_type"
509

  
510
  create_table "versions", :force => true do |t|
511
    t.integer  "project_id",      :default => 0,      :null => false
512
    t.string   "name",            :default => "",     :null => false
513
    t.string   "description",     :default => ""
514
    t.date     "effective_date"
515
    t.datetime "created_on"
516
    t.datetime "updated_on"
517
    t.string   "wiki_page_title"
518
    t.string   "status",          :default => "open"
519
    t.string   "sharing",         :default => "none", :null => false
520
  end
521

  
522
  add_index "versions", ["project_id"], :name => "versions_project_id"
523
  add_index "versions", ["sharing"], :name => "index_versions_on_sharing"
524

  
525
  create_table "watchers", :force => true do |t|
526
    t.string  "watchable_type", :default => "", :null => false
527
    t.integer "watchable_id",   :default => 0,  :null => false
528
    t.integer "user_id"
529
  end
530

  
531
  add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type"
532
  add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id"
533
  add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type"
534

  
535
  create_table "wiki_content_versions", :force => true do |t|
536
    t.integer  "wiki_content_id",                                       :null => false
537
    t.integer  "page_id",                                               :null => false
538
    t.integer  "author_id"
539
    t.binary   "data",            :limit => 2147483647
540
    t.string   "compression",     :limit => 6,          :default => ""
541
    t.string   "comments",                              :default => ""
542
    t.datetime "updated_on",                                            :null => false
543
    t.integer  "version",                                               :null => false
544
  end
545

  
546
  add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on"
547
  add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid"
548

  
549
  create_table "wiki_contents", :force => true do |t|
550
    t.integer  "page_id",                                          :null => false
551
    t.integer  "author_id"
552
    t.text     "text",       :limit => 2147483647
553
    t.string   "comments",                         :default => ""
554
    t.datetime "updated_on",                                       :null => false
555
    t.integer  "version",                                          :null => false
556
  end
557

  
558
  add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id"
559
  add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id"
560

  
561
  create_table "wiki_pages", :force => true do |t|
562
    t.integer  "wiki_id",                       :null => false
563
    t.string   "title",                         :null => false
564
    t.datetime "created_on",                    :null => false
565
    t.boolean  "protected",  :default => false, :null => false
566
    t.integer  "parent_id"
567
  end
568

  
569
  add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id"
570
  add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title"
571
  add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id"
572

  
573
  create_table "wiki_redirects", :force => true do |t|
574
    t.integer  "wiki_id",      :null => false
575
    t.string   "title"
576
    t.string   "redirects_to"
577
    t.datetime "created_on",   :null => false
578
  end
579

  
580
  add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title"
581
  add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id"
582

  
583
  create_table "wikis", :force => true do |t|
584
    t.integer "project_id",                :null => false
585
    t.string  "start_page",                :null => false
586
    t.integer "status",     :default => 1, :null => false
587
  end
588

  
589
  add_index "wikis", ["project_id"], :name => "wikis_project_id"
590

  
591
  create_table "workflows", :force => true do |t|
592
    t.integer "tracker_id",                  :default => 0,     :null => false
593
    t.integer "old_status_id",               :default => 0,     :null => false
594
    t.integer "new_status_id",               :default => 0,     :null => false
595
    t.integer "role_id",                     :default => 0,     :null => false
596
    t.boolean "assignee",                    :default => false, :null => false
597
    t.boolean "author",                      :default => false, :null => false
598
    t.string  "type",          :limit => 30
599
    t.string  "field_name",    :limit => 30
600
    t.string  "rule",          :limit => 30
601
  end
602

  
603
  add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id"
604
  add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id"
605
  add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status"
606
  add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id"
607

  
608
end
db/seeds.rb (revision 0)
1
Role.create! do |non_member|
2
  non_member.id = 1
3
  non_member.name = 'Non Member'
4
  non_member.builtin = Role::BUILTIN_NON_MEMBER
5
  non_member.position = 1
6
  non_member.assignable = true
7
  non_member.issues_visibility = 'default'
8
end
9

  
10
Role.create! do |anonymous|
11
  anonymous.id = 2
12
  anonymous.name = 'Anonymous'
13
  anonymous.builtin = Role::BUILTIN_ANONYMOUS
14
  anonymous.position = 2
15
  anonymous.assignable = true
16
  anonymous.issues_visibility = 'default'
17
end
18

  
19
User.create! do |admin|
20
  admin.id = 1
21
  admin.login = 'admin'
22
  admin.password = 'admin'
23
  admin.admin = true
24
  admin.status = User::STATUS_ACTIVE
25
  admin.mail = 'admin@example.net'
26
  admin.firstname = 'Redmine'
27
  admin.lastname = 'Admin'
28
  admin.language = 'en'
29
  admin.mail_notification = 'all'
30
end
    (1-1/1)