erp_work_effort 3.1.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/app/controllers/erp_work_effort/erp_app/organizer/tasks/base_controller.rb +13 -0
  3. data/app/controllers/erp_work_effort/erp_app/organizer/tasks/work_efforts_controller.rb +128 -0
  4. data/app/models/associated_transportation_route.rb +12 -0
  5. data/app/models/associated_work_effort.rb +12 -0
  6. data/app/models/deliverable.rb +7 -0
  7. data/app/models/deliverable_type.rb +9 -0
  8. data/app/models/extensions/party.rb +0 -2
  9. data/app/models/good_type.rb +11 -0
  10. data/app/models/party_fixed_asset_assignment.rb +12 -0
  11. data/app/models/party_skill.rb +6 -0
  12. data/app/models/requirement.rb +14 -0
  13. data/app/models/requirement_party_role.rb +8 -0
  14. data/app/models/requirement_type.rb +7 -0
  15. data/app/models/skill_type.rb +10 -0
  16. data/app/models/transportation_route.rb +71 -0
  17. data/app/models/transportation_route_segment.rb +9 -0
  18. data/app/models/transportation_route_stop.rb +6 -0
  19. data/app/models/work_effort.rb +82 -92
  20. data/app/models/work_effort_association.rb +16 -0
  21. data/app/models/work_effort_association_type.rb +14 -0
  22. data/app/models/work_effort_deliverable_produced.rb +6 -0
  23. data/app/models/work_effort_fixed_asset_assignment.rb +10 -0
  24. data/app/models/work_effort_fixed_asset_serviced.rb +6 -0
  25. data/app/models/work_effort_fixed_asset_standard.rb +7 -0
  26. data/app/models/work_effort_good_standard.rb +7 -0
  27. data/app/models/work_effort_inventory_assignment.rb +10 -0
  28. data/app/models/work_effort_inventory_produced.rb +7 -0
  29. data/app/models/work_effort_party_assignment.rb +12 -0
  30. data/app/models/work_effort_purpose_type.rb +11 -0
  31. data/app/models/work_effort_skill_standard.rb +7 -0
  32. data/app/models/work_effort_type.rb +9 -0
  33. data/app/models/work_effort_type_association.rb +10 -0
  34. data/app/models/work_order_item.rb +5 -0
  35. data/app/models/work_order_item_fulfillment.rb +11 -0
  36. data/app/models/work_requirement_fulfillment.rb +3 -0
  37. data/config/routes.rb +20 -0
  38. data/db/data_migrations/20131213151309_create_tasks_organizer_application.rb +14 -0
  39. data/db/data_migrations/20131215225329_add_task_work_effort_types.rb +11 -0
  40. data/db/data_migrations/20131215234936_add_task_statuses.rb +21 -0
  41. data/db/migrate/20100220000000_base_work_efforts.rb +506 -103
  42. data/db/migrate/20130829153419_base_routes.rb +93 -0
  43. data/db/migrate/20131213140617_add_work_effort_role_assignments.rb +16 -0
  44. data/db/migrate/20131213144223_add_work_item_to_work_effort.rb +8 -0
  45. data/db/migrate/20140106184615_update_work_effort_item_id_to_int.rb +27 -0
  46. data/lib/erp_work_effort.rb +1 -1
  47. data/lib/erp_work_effort/engine.rb +7 -5
  48. data/lib/erp_work_effort/extensions.rb +2 -4
  49. data/lib/erp_work_effort/extensions/active_record/acts_as_routable.rb +55 -0
  50. data/lib/erp_work_effort/extensions/active_record/acts_as_work_effort.rb +66 -0
  51. data/lib/erp_work_effort/version.rb +7 -3
  52. data/spec/models/deliverable_spec.rb +5 -0
  53. data/spec/models/deliverable_type_spec.rb +5 -0
  54. data/spec/models/facility_spec.rb +8 -0
  55. data/spec/models/facility_type_spec.rb +8 -0
  56. data/spec/models/fixed_asset_party_role_spec.rb +5 -0
  57. data/spec/models/fixed_asset_spec.rb +5 -0
  58. data/spec/models/fixed_asset_type_spec.rb +5 -0
  59. data/spec/models/good_type_spec.rb +5 -0
  60. data/spec/models/party_fixed_asset_assignment_spec.rb +5 -0
  61. data/spec/models/party_skill_spec.rb +5 -0
  62. data/spec/models/requirement_party_role_spec.rb +5 -0
  63. data/spec/models/requirement_spec.rb +5 -0
  64. data/spec/models/requirement_type_spec.rb +5 -0
  65. data/spec/models/skill_type_spec.rb +8 -0
  66. data/spec/models/work_effort_association_spec.rb +5 -0
  67. data/spec/models/work_effort_association_type_spec.rb +5 -0
  68. data/spec/models/work_effort_deliverable_produced_spec.rb +5 -0
  69. data/spec/models/work_effort_fixed_asset_assignment_spec.rb +5 -0
  70. data/spec/models/work_effort_fixed_asset_serviced_spec.rb +5 -0
  71. data/spec/models/work_effort_fixed_asset_standard_spec.rb +5 -0
  72. data/spec/models/work_effort_good_standard_spec.rb +5 -0
  73. data/spec/models/work_effort_inventory_assignment_spec.rb +5 -0
  74. data/spec/models/work_effort_inventory_produced_spec.rb +5 -0
  75. data/spec/models/work_effort_party_assignment_spec.rb +5 -0
  76. data/spec/models/work_effort_purpose_type_spec.rb +5 -0
  77. data/spec/models/work_effort_skill_standard_spec.rb +5 -0
  78. data/spec/models/work_effort_spec.rb +49 -0
  79. data/spec/models/work_effort_type_association_spec.rb +5 -0
  80. data/spec/models/work_effort_type_spec.rb +5 -0
  81. data/spec/models/work_order_item_fulfillment_spec.rb +5 -0
  82. data/spec/models/work_order_item_spec.rb +29 -0
  83. data/spec/models/work_requirement_fulfillment_spec.rb +5 -0
  84. metadata +141 -105
  85. data/app/assets/javascripts/erp_work_effort/application.js +0 -9
  86. data/app/assets/stylesheets/erp_work_effort/application.css +0 -7
  87. data/app/controllers/erp_work_effort/application_controller.rb +0 -4
  88. data/app/helpers/erp_work_effort/application_helper.rb +0 -4
  89. data/app/models/cost.rb +0 -5
  90. data/app/models/project_effort.rb +0 -2
  91. data/app/models/project_requirement.rb +0 -2
  92. data/app/models/support_effort.rb +0 -2
  93. data/app/models/support_requirement.rb +0 -2
  94. data/app/models/work_effort_assignment.rb +0 -12
  95. data/app/models/work_effort_status.rb +0 -6
  96. data/app/models/work_effort_status_type.rb +0 -15
  97. data/app/models/work_requirement.rb +0 -78
  98. data/app/models/work_requirement_work_effort_status_type.rb +0 -6
  99. data/app/views/layouts/erp_work_effort/application.html.erb +0 -14
  100. data/lib/erp_work_effort/extensions/active_record/acts_as_project_effort.rb +0 -66
  101. data/lib/erp_work_effort/extensions/active_record/acts_as_project_requirement.rb +0 -64
  102. data/lib/erp_work_effort/extensions/active_record/acts_as_support_effort.rb +0 -61
  103. data/lib/erp_work_effort/extensions/active_record/acts_as_support_requirement.rb +0 -68
  104. data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +0 -15
  105. data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +0 -12
  106. data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +0 -19
  107. data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +0 -16
  108. data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +0 -12
  109. data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +0 -22
  110. data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +0 -20
  111. data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +0 -24
  112. data/spec/dummy/db/migrate/20130107204429_base_erp_services.erp_base_erp_svcs.rb +0 -461
  113. data/spec/dummy/db/migrate/20130107204430_base_work_efforts.erp_work_effort.rb +0 -211
  114. data/spec/dummy/db/migrate/20130107204431_base_tech_services.erp_tech_svcs.rb +0 -271
  115. data/spec/dummy/db/migrate/20130107204432_create_has_attribute_tables.erp_tech_svcs.rb +0 -39
  116. data/spec/dummy/db/migrate/20130107204433_create_groups.erp_tech_svcs.rb +0 -19
  117. data/spec/dummy/db/migrate/20130107204434_upgrade_security.erp_tech_svcs.rb +0 -54
  118. data/spec/dummy/db/migrate/20130107204435_upgrade_security2.erp_tech_svcs.rb +0 -270
  119. data/spec/dummy/db/schema.rb +0 -750
  120. data/spec/dummy/db/spec.sqlite3 +0 -0
  121. data/spec/models/cost_spec.rb +0 -11
  122. data/spec/models/project_effort_spec.rb +0 -11
  123. data/spec/models/project_requirement_spec.rb +0 -11
  124. data/spec/models/support_effort_spec.rb +0 -11
  125. data/spec/models/support_requirement_spec.rb +0 -11
  126. data/spec/models/valid_work_assignment_attribute_spec.rb +0 -11
  127. data/spec/models/valid_work_assignment_spec.rb +0 -11
  128. data/spec/models/work_effort_assignment_spec.rb +0 -13
  129. data/spec/models/work_effort_status_spec.rb +0 -11
  130. data/spec/models/work_effort_status_type_spec.rb +0 -11
  131. data/spec/models/work_requirement_spec.rb +0 -11
  132. data/spec/models/work_requirement_work_effort_status_type._spec.rb +0 -11
@@ -1,39 +0,0 @@
1
- # This migration comes from erp_tech_svcs (originally 20111117183144)
2
- class CreateHasAttributeTables < ActiveRecord::Migration
3
- def up
4
- unless table_exists?(:attribute_types)
5
- create_table :attribute_types do |t|
6
- t.string :internal_identifier
7
- t.string :description
8
- t.string :data_type
9
-
10
- t.timestamps
11
- end
12
-
13
- add_index :attribute_types, :internal_identifier, :name => ':attribute_types_iid_idx'
14
- end
15
- unless table_exists?(:attribute_values)
16
- create_table :attribute_values do |t|
17
- t.integer :attributed_record_id
18
- t.string :attributed_record_type
19
- t.references :attribute_type
20
- t.string :value
21
-
22
- t.timestamps
23
- end
24
-
25
- add_index :attribute_values, [:attributed_record_id, :attributed_record_type], :name => 'attribute_values_attributed_record_idx'
26
- add_index :attribute_values, :attribute_type_id, :name => 'attribute_values_attributed_type_idx'
27
- add_index :attribute_values, :value, :name => 'attribute_values_value_idx'
28
- end
29
- end
30
-
31
- def down
32
- if table_exists?(:attribute_types)
33
- drop_table :attribute_types
34
- end
35
- if table_exists?(:attribute_values)
36
- drop_table :attribute_values
37
- end
38
- end
39
- end
@@ -1,19 +0,0 @@
1
- # This migration comes from erp_tech_svcs (originally 20121116151510)
2
- class CreateGroups < ActiveRecord::Migration
3
- def self.up
4
- unless table_exists?(:groups)
5
- create_table :groups do |t|
6
- t.column :description, :string
7
- t.timestamps
8
- end
9
- end
10
- end
11
-
12
- def self.down
13
- [ :groups ].each do |tbl|
14
- if table_exists?(tbl)
15
- drop_table tbl
16
- end
17
- end
18
- end
19
- end
@@ -1,54 +0,0 @@
1
- # This migration comes from erp_tech_svcs (originally 20121126171612)
2
- class UpgradeSecurity < ActiveRecord::Migration
3
-
4
- def self.up
5
- unless table_exists?(:capability_accessors)
6
- create_table :capability_accessors do |t|
7
- t.string :capability_accessor_record_type
8
- t.integer :capability_accessor_record_id
9
- t.integer :capability_id
10
- t.timestamps
11
- end
12
-
13
- add_index :capability_accessors, :capability_id
14
- add_index :capability_accessors, [:capability_accessor_record_id, :capability_accessor_record_type], :name => 'capability_accessor_record_index'
15
- end
16
-
17
- unless columns(:capabilities).collect {|c| c.name}.include?('scope_query')
18
- add_column :capabilities, :description, :string
19
- add_column :capabilities, :capability_resource_type, :string
20
- add_column :capabilities, :capability_resource_id, :integer
21
- add_column :capabilities, :scope_type_id, :integer
22
- add_column :capabilities, :scope_query, :text
23
-
24
- add_index :capabilities, :scope_type_id
25
- add_index :capabilities, [:capability_resource_id, :capability_resource_type], :name => 'capability_resource_index'
26
- end
27
-
28
- unless table_exists?(:scope_types)
29
- create_table :scope_types do |t|
30
- t.string :description
31
- t.string :internal_identifier
32
- t.timestamps
33
- end
34
-
35
- add_index :scope_types, :internal_identifier
36
- end
37
-
38
- unless table_exists?(:parties_security_roles)
39
- create_table :parties_security_roles, :id => false do |t|
40
- t.integer :party_id
41
- t.integer :security_role_id
42
- end
43
-
44
- add_index :parties_security_roles, :party_id
45
- add_index :parties_security_roles, :security_role_id
46
- end
47
-
48
- rename_table :roles, :security_roles unless table_exists?(:security_roles)
49
-
50
- end
51
-
52
- def self.down
53
- end
54
- end
@@ -1,270 +0,0 @@
1
- # This migration comes from erp_tech_svcs (originally 20121126173506)
2
- class UpgradeSecurity2 < ActiveRecord::Migration
3
- def self.up
4
- if table_exists?(:secured_models)
5
- Website.all.each do |w|
6
- old_role_iid = "website_#{w.name.underscore.gsub("'","").gsub(",","")}_access"
7
-
8
- r = SecurityRole.find_by_internal_identifier(old_role_iid)
9
- unless r.nil?
10
- r.internal_identifier = w.website_role_iid
11
- r.save
12
- end
13
- end
14
- instance = ScopeType.create(:description => 'Instance', :internal_identifier => 'instance')
15
- class_scope_type = ScopeType.create(:description => 'Class', :internal_identifier => 'class')
16
- ScopeType.create(:description => 'Query', :internal_identifier => 'query')
17
-
18
- execute('BEGIN TRANSACTION')
19
- puts "populating parties_security_roles"
20
- sql =
21
- "INSERT INTO parties_security_roles (
22
- party_id,
23
- security_role_id
24
- )
25
- SELECT
26
- u.party_id AS party_id,
27
- rsm.role_id AS security_role_id
28
- FROM secured_models sm
29
- JOIN roles_secured_models rsm ON sm.id=rsm.secured_model_id
30
- JOIN users u ON sm.secured_record_id=u.id
31
- WHERE sm.secured_record_type='User'"
32
-
33
- execute(sql)
34
- execute('COMMIT')
35
-
36
- execute('BEGIN TRANSACTION')
37
- puts "populating capabilities with secure File Assets"
38
- sql =
39
- "INSERT INTO capabilities (
40
- capability_type_id,
41
- capability_resource_type,
42
- capability_resource_id,
43
- scope_type_id
44
- )
45
- SELECT
46
- c.capability_type_id AS capability_type_id,
47
- 'FileAsset' AS capability_resource_type,
48
- cm.capable_model_record_id AS capability_resource_id,
49
- #{instance.id} AS scope_type_id
50
- FROM capable_models AS cm
51
- JOIN capabilities_capable_models AS ccm ON ccm.capable_model_id = cm.id
52
- JOIN capabilities AS c ON ccm.capability_id = c.id
53
- JOIN secured_models AS sm ON sm.secured_record_id = c.id AND sm.secured_record_type = 'Capability'
54
- JOIN roles_secured_models AS rsm ON rsm.secured_model_id = sm.id
55
- JOIN security_roles AS r ON r.id = rsm.role_id
56
- WHERE cm.capable_model_record_type = 'FileAsset'"
57
-
58
- execute(sql)
59
- execute('COMMIT')
60
-
61
- view = CapabilityType.find_by_internal_identifier('view')
62
-
63
- execute('BEGIN TRANSACTION')
64
- puts "populating capabilities with secure Website Sections"
65
- sql =
66
- "INSERT INTO capabilities (
67
- capability_type_id,
68
- capability_resource_type,
69
- capability_resource_id,
70
- scope_type_id
71
- )
72
- SELECT
73
- #{view.id} AS capability_type_id,
74
- 'WebsiteSection' AS capability_resource_type,
75
- ws.id AS capability_resource_id,
76
- #{instance.id} AS scope_type_id
77
- FROM secured_models sm
78
- JOIN roles_secured_models rsm ON sm.id=rsm.secured_model_id
79
- JOIN website_sections ws ON sm.secured_record_id=ws.id
80
- WHERE sm.secured_record_type='WebsiteSection'"
81
-
82
- execute(sql)
83
- execute('COMMIT')
84
-
85
- execute('BEGIN TRANSACTION')
86
- puts "populating capabilities with secure Website Nav Items"
87
- sql =
88
- "INSERT INTO capabilities (
89
- capability_type_id,
90
- capability_resource_type,
91
- capability_resource_id,
92
- scope_type_id
93
- )
94
- SELECT
95
- #{view.id} AS capability_type_id,
96
- 'WebsiteNavItem' AS capability_resource_type,
97
- ws.id AS capability_resource_id,
98
- #{instance.id} AS scope_type_id
99
- FROM secured_models sm
100
- JOIN roles_secured_models rsm ON sm.id=rsm.secured_model_id
101
- JOIN website_sections ws ON sm.secured_record_id=ws.id
102
- WHERE sm.secured_record_type='WebsiteNavItem'"
103
-
104
- execute(sql)
105
- execute('COMMIT')
106
-
107
- # delete obsolete records: Application, Widget, dupes?
108
- Capability.where("capability_resource_type IS NULL").delete_all
109
-
110
- admin = SecurityRole.find_by_internal_identifier('admin')
111
- website_author = SecurityRole.find_by_internal_identifier('website_author')
112
- layout_author = SecurityRole.find_by_internal_identifier('layout_author')
113
- content_author = SecurityRole.find_by_internal_identifier('content_author')
114
- designer = SecurityRole.find_by_internal_identifier('designer')
115
- publisher = SecurityRole.find_by_internal_identifier('publisher')
116
-
117
- # add instance capabilities to roles
118
- instance_capabilities = Capability.where(:scope_type_id => instance.id).all
119
- instance_capabilities.each do |c|
120
- case c.capability_resource_type
121
- when 'FileAsset'
122
- admin.add_capability(c)
123
- website_author.add_capability(c)
124
- content_author.add_capability(c)
125
- if c.capability_resource.file_asset_holder_type == 'Website'
126
- website_role = c.capability_resource.file_asset_holder.role
127
- website_role.add_capability(c)
128
- end
129
- when 'WebsiteSection'
130
- admin.add_capability(c)
131
- website_author.add_capability(c)
132
- website_role = c.capability_resource.website.role
133
- website_role.add_capability(c)
134
- when 'WebsiteNavItem'
135
- admin.add_capability(c)
136
- website_author.add_capability(c)
137
- website_role = c.capability_resource.website_nav.website.role
138
- website_role.add_capability(c)
139
- end
140
- end
141
-
142
- # add knitkit class capabilities to roles
143
- admin.add_capability('create', 'WebsiteNav')
144
- admin.add_capability('delete', 'WebsiteNav')
145
- admin.add_capability('edit', 'WebsiteNav')
146
-
147
- website_author.add_capability('create', 'WebsiteNav')
148
- website_author.add_capability('delete', 'WebsiteNav')
149
- website_author.add_capability('edit', 'WebsiteNav')
150
-
151
- admin.add_capability('create', 'Website')
152
- admin.add_capability('delete', 'Website')
153
- admin.add_capability('edit', 'Website')
154
- admin.add_capability('import', 'Website')
155
- admin.add_capability('publish', 'Website')
156
- admin.add_capability('activate', 'Website')
157
-
158
- website_author.add_capability('create', 'Website')
159
- website_author.add_capability('delete', 'Website')
160
- website_author.add_capability('edit', 'Website')
161
- website_author.add_capability('import', 'Website')
162
- publisher.add_capability('publish', 'Website')
163
- publisher.add_capability('activate', 'Website')
164
-
165
- admin.add_capability('create', 'WebsiteHost')
166
- admin.add_capability('delete', 'WebsiteHost')
167
- admin.add_capability('edit', 'WebsiteHost')
168
-
169
- website_author.add_capability('create', 'WebsiteHost')
170
- website_author.add_capability('delete', 'WebsiteHost')
171
- website_author.add_capability('edit', 'WebsiteHost')
172
-
173
- admin.add_capability('create', 'WebsiteSection')
174
- admin.add_capability('delete', 'WebsiteSection')
175
- admin.add_capability('edit', 'WebsiteSection')
176
- admin.add_capability('secure', 'WebsiteSection')
177
- admin.add_capability('unsecure', 'WebsiteSection')
178
-
179
- website_author.add_capability('create', 'WebsiteSection')
180
- website_author.add_capability('delete', 'WebsiteSection')
181
- website_author.add_capability('edit', 'WebsiteSection')
182
- website_author.add_capability('secure', 'WebsiteSection')
183
- website_author.add_capability('unsecure', 'WebsiteSection')
184
-
185
- admin.add_capability('create', 'WebsiteSectionLayout')
186
- admin.add_capability('edit', 'WebsiteSectionLayout')
187
-
188
- layout_author.add_capability('create', 'WebsiteSectionLayout')
189
- layout_author.add_capability('edit', 'WebsiteSectionLayout')
190
-
191
- admin.add_capability('create', 'Content')
192
- admin.add_capability('delete', 'Content')
193
- admin.add_capability('edit', 'Content')
194
- admin.add_capability('publish', 'Content')
195
- admin.add_capability('revert_version', 'Content')
196
- admin.add_capability('add_existing', 'Content')
197
- admin.add_capability('edit_html', 'Content')
198
- admin.add_capability('edit_excerpt', 'Content')
199
-
200
- content_author.add_capability('create', 'Content')
201
- content_author.add_capability('delete', 'Content')
202
- content_author.add_capability('edit', 'Content')
203
- content_author.add_capability('publish', 'Content')
204
- content_author.add_capability('revert_version', 'Content')
205
- content_author.add_capability('add_existing', 'Content')
206
- content_author.add_capability('edit_html', 'Content')
207
- content_author.add_capability('edit_excerpt', 'Content')
208
-
209
- admin.add_capability('create', 'WebsiteNavItem')
210
- admin.add_capability('delete', 'WebsiteNavItem')
211
- admin.add_capability('edit', 'WebsiteNavItem')
212
- admin.add_capability('secure', 'WebsiteNavItem')
213
- admin.add_capability('unsecure', 'WebsiteNavItem')
214
-
215
- website_author.add_capability('create', 'WebsiteNavItem')
216
- website_author.add_capability('delete', 'WebsiteNavItem')
217
- website_author.add_capability('edit', 'WebsiteNavItem')
218
- website_author.add_capability('secure', 'WebsiteNavItem')
219
- website_author.add_capability('unsecure', 'WebsiteNavItem')
220
-
221
- admin.add_capability('view', 'Theme')
222
- designer.add_capability('view', 'Theme')
223
-
224
- admin.add_capability('view', 'SiteImageAsset')
225
- website_author.add_capability('view', 'SiteImageAsset')
226
- content_author.add_capability('view', 'SiteImageAsset')
227
-
228
- content_author.add_capability('view', 'GlobalImageAsset')
229
-
230
- admin.add_capability('view', 'GlobalImageAsset')
231
- admin.add_capability('upload', 'GlobalImageAsset')
232
- admin.add_capability('delete', 'GlobalImageAsset')
233
-
234
- website_author.add_capability('view', 'GlobalImageAsset')
235
- website_author.add_capability('upload', 'GlobalImageAsset')
236
- website_author.add_capability('delete', 'GlobalImageAsset')
237
-
238
- admin.add_capability('view', 'SiteFileAsset')
239
- website_author.add_capability('view', 'SiteFileAsset')
240
- content_author.add_capability('view', 'SiteFileAsset')
241
-
242
- content_author.add_capability('view', 'GlobalFileAsset')
243
-
244
- admin.add_capability('view', 'GlobalFileAsset')
245
- admin.add_capability('upload', 'GlobalFileAsset')
246
- admin.add_capability('delete', 'GlobalFileAsset')
247
-
248
- website_author.add_capability('view', 'GlobalFileAsset')
249
- website_author.add_capability('upload', 'GlobalFileAsset')
250
- website_author.add_capability('delete', 'GlobalFileAsset')
251
-
252
- admin.add_capability('drag_item', 'WebsiteTree')
253
- website_author.add_capability('drag_item', 'WebsiteTree')
254
-
255
- # update capability descriptions
256
- Capability.all.each do |c|
257
- c.update_description
258
- end
259
-
260
- drop_table :capable_models
261
- drop_table :capabilities_capable_models
262
- drop_table :secured_models
263
- drop_table :roles_secured_models
264
- remove_column :capabilities, :resource
265
- end
266
- end
267
-
268
- def self.down
269
- end
270
- end
@@ -1,750 +0,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 => 20130107204435) do
15
-
16
- create_table "attribute_types", :force => true do |t|
17
- t.string "internal_identifier"
18
- t.string "description"
19
- t.string "data_type"
20
- t.datetime "created_at", :null => false
21
- t.datetime "updated_at", :null => false
22
- end
23
-
24
- add_index "attribute_types", ["internal_identifier"], :name => ":attribute_types_iid_idx"
25
-
26
- create_table "attribute_values", :force => true do |t|
27
- t.integer "attributed_record_id"
28
- t.string "attributed_record_type"
29
- t.integer "attribute_type_id"
30
- t.string "value"
31
- t.datetime "created_at", :null => false
32
- t.datetime "updated_at", :null => false
33
- end
34
-
35
- add_index "attribute_values", ["attribute_type_id"], :name => "attribute_values_attributed_type_idx"
36
- add_index "attribute_values", ["attributed_record_id", "attributed_record_type"], :name => "attribute_values_attributed_record_idx"
37
- add_index "attribute_values", ["value"], :name => "attribute_values_value_idx"
38
-
39
- create_table "audit_log_item_types", :force => true do |t|
40
- t.string "internal_identifier"
41
- t.string "external_identifier"
42
- t.string "external_id_source"
43
- t.string "description"
44
- t.string "comments"
45
- t.integer "parent_id"
46
- t.integer "lft"
47
- t.integer "rgt"
48
- t.datetime "created_at", :null => false
49
- t.datetime "updated_at", :null => false
50
- end
51
-
52
- create_table "audit_log_items", :force => true do |t|
53
- t.integer "audit_log_id"
54
- t.integer "audit_log_item_type_id"
55
- t.string "audit_log_item_value"
56
- t.string "description"
57
- t.datetime "created_at", :null => false
58
- t.datetime "updated_at", :null => false
59
- end
60
-
61
- create_table "audit_log_types", :force => true do |t|
62
- t.string "description"
63
- t.string "error_code"
64
- t.string "comments"
65
- t.string "internal_identifier"
66
- t.string "external_identifier"
67
- t.string "external_id_source"
68
- t.integer "parent_id"
69
- t.integer "lft"
70
- t.integer "rgt"
71
- t.datetime "created_at", :null => false
72
- t.datetime "updated_at", :null => false
73
- end
74
-
75
- create_table "audit_logs", :force => true do |t|
76
- t.string "application"
77
- t.string "description"
78
- t.integer "party_id"
79
- t.text "additional_info"
80
- t.integer "audit_log_type_id"
81
- t.integer "event_record_id"
82
- t.string "event_record_type"
83
- t.datetime "created_at", :null => false
84
- t.datetime "updated_at", :null => false
85
- end
86
-
87
- add_index "audit_logs", ["event_record_id", "event_record_type"], :name => "event_record_index"
88
- add_index "audit_logs", ["party_id"], :name => "index_audit_logs_on_party_id"
89
-
90
- create_table "capabilities", :force => true do |t|
91
- t.string "description"
92
- t.integer "capability_type_id"
93
- t.string "capability_resource_type"
94
- t.integer "capability_resource_id"
95
- t.integer "scope_type_id"
96
- t.text "scope_query"
97
- t.datetime "created_at", :null => false
98
- t.datetime "updated_at", :null => false
99
- end
100
-
101
- add_index "capabilities", ["capability_resource_id", "capability_resource_type"], :name => "capability_resource_index"
102
- add_index "capabilities", ["capability_type_id"], :name => "index_capabilities_on_capability_type_id"
103
- add_index "capabilities", ["scope_type_id"], :name => "index_capabilities_on_scope_type_id"
104
-
105
- create_table "capability_accessors", :force => true do |t|
106
- t.string "capability_accessor_record_type"
107
- t.integer "capability_accessor_record_id"
108
- t.integer "capability_id"
109
- t.datetime "created_at", :null => false
110
- t.datetime "updated_at", :null => false
111
- end
112
-
113
- add_index "capability_accessors", ["capability_accessor_record_id", "capability_accessor_record_type"], :name => "capability_accessor_record_index"
114
- add_index "capability_accessors", ["capability_id"], :name => "index_capability_accessors_on_capability_id"
115
-
116
- create_table "capability_types", :force => true do |t|
117
- t.string "internal_identifier"
118
- t.string "description"
119
- t.datetime "created_at", :null => false
120
- t.datetime "updated_at", :null => false
121
- end
122
-
123
- create_table "capable_models", :force => true do |t|
124
- t.integer "capable_model_record_id"
125
- t.string "capable_model_record_type"
126
- t.datetime "created_at", :null => false
127
- t.datetime "updated_at", :null => false
128
- end
129
-
130
- add_index "capable_models", ["capable_model_record_id", "capable_model_record_type"], :name => "capable_model_record_idx"
131
-
132
- create_table "categories", :force => true do |t|
133
- t.string "description"
134
- t.string "external_identifier"
135
- t.datetime "from_date"
136
- t.datetime "to_date"
137
- t.string "internal_identifier"
138
- t.integer "category_record_id"
139
- t.string "category_record_type"
140
- t.integer "parent_id"
141
- t.integer "lft"
142
- t.integer "rgt"
143
- t.datetime "created_at", :null => false
144
- t.datetime "updated_at", :null => false
145
- end
146
-
147
- add_index "categories", ["category_record_id", "category_record_type"], :name => "category_polymorphic"
148
-
149
- create_table "category_classifications", :force => true do |t|
150
- t.integer "category_id"
151
- t.string "classification_type"
152
- t.integer "classification_id"
153
- t.datetime "from_date"
154
- t.datetime "to_date"
155
- t.datetime "created_at", :null => false
156
- t.datetime "updated_at", :null => false
157
- end
158
-
159
- add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
160
-
161
- create_table "compass_ae_instances", :force => true do |t|
162
- t.decimal "version", :precision => 8, :scale => 3
163
- t.datetime "created_at", :null => false
164
- t.datetime "updated_at", :null => false
165
- end
166
-
167
- create_table "contact_purposes", :force => true do |t|
168
- t.integer "parent_id"
169
- t.integer "lft"
170
- t.integer "rgt"
171
- t.string "description"
172
- t.string "comments"
173
- t.string "internal_identifier"
174
- t.string "external_identifier"
175
- t.string "external_id_source"
176
- t.datetime "created_at", :null => false
177
- t.datetime "updated_at", :null => false
178
- end
179
-
180
- add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
181
-
182
- create_table "contact_purposes_contacts", :id => false, :force => true do |t|
183
- t.integer "contact_id"
184
- t.integer "contact_purpose_id"
185
- end
186
-
187
- add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
188
-
189
- create_table "contact_types", :force => true do |t|
190
- t.integer "parent_id"
191
- t.integer "lft"
192
- t.integer "rgt"
193
- t.string "description"
194
- t.string "comments"
195
- t.string "internal_identifier"
196
- t.string "external_identifier"
197
- t.string "external_id_source"
198
- t.datetime "created_at", :null => false
199
- t.datetime "updated_at", :null => false
200
- end
201
-
202
- add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
203
-
204
- create_table "contacts", :force => true do |t|
205
- t.integer "party_id"
206
- t.integer "contact_mechanism_id"
207
- t.string "contact_mechanism_type"
208
- t.string "external_identifier"
209
- t.string "external_id_source"
210
- t.datetime "created_at", :null => false
211
- t.datetime "updated_at", :null => false
212
- end
213
-
214
- add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
215
- add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
216
-
217
- create_table "costs", :force => true do |t|
218
- t.integer "money_id"
219
- t.datetime "created_at", :null => false
220
- t.datetime "updated_at", :null => false
221
- end
222
-
223
- create_table "currencies", :force => true do |t|
224
- t.string "name"
225
- t.string "definition"
226
- t.string "internal_identifier"
227
- t.string "numeric_code"
228
- t.string "major_unit_symbol"
229
- t.string "minor_unit_symbol"
230
- t.string "ratio_of_minor_unit_to_major_unit"
231
- t.string "postfix_label"
232
- t.datetime "introduction_date"
233
- t.datetime "expiration_date"
234
- t.datetime "created_at", :null => false
235
- t.datetime "updated_at", :null => false
236
- end
237
-
238
- add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
239
-
240
- create_table "delayed_jobs", :force => true do |t|
241
- t.integer "priority", :default => 0
242
- t.integer "attempts", :default => 0
243
- t.text "handler"
244
- t.text "last_error"
245
- t.datetime "run_at"
246
- t.datetime "locked_at"
247
- t.datetime "failed_at"
248
- t.string "locked_by"
249
- t.string "queue"
250
- t.datetime "created_at", :null => false
251
- t.datetime "updated_at", :null => false
252
- end
253
-
254
- add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
255
-
256
- create_table "descriptive_assets", :force => true do |t|
257
- t.integer "view_type_id"
258
- t.string "internal_identifier"
259
- t.text "description"
260
- t.string "external_identifier"
261
- t.string "external_id_source"
262
- t.integer "described_record_id"
263
- t.string "described_record_type"
264
- t.datetime "created_at", :null => false
265
- t.datetime "updated_at", :null => false
266
- end
267
-
268
- add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
269
- add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
270
-
271
- create_table "email_addresses", :force => true do |t|
272
- t.string "email_address"
273
- t.string "description"
274
- t.datetime "created_at", :null => false
275
- t.datetime "updated_at", :null => false
276
- end
277
-
278
- create_table "file_assets", :force => true do |t|
279
- t.integer "file_asset_holder_id"
280
- t.string "file_asset_holder_type"
281
- t.string "type"
282
- t.string "name"
283
- t.string "directory"
284
- t.string "data_file_name"
285
- t.string "data_content_type"
286
- t.integer "data_file_size"
287
- t.datetime "data_updated_at"
288
- t.string "width"
289
- t.string "height"
290
- t.datetime "created_at", :null => false
291
- t.datetime "updated_at", :null => false
292
- end
293
-
294
- add_index "file_assets", ["directory"], :name => "index_file_assets_on_directory"
295
- add_index "file_assets", ["file_asset_holder_id", "file_asset_holder_type"], :name => "file_asset_holder_idx"
296
- add_index "file_assets", ["name"], :name => "index_file_assets_on_name"
297
- add_index "file_assets", ["type"], :name => "index_file_assets_on_type"
298
-
299
- create_table "geo_countries", :force => true do |t|
300
- t.string "name"
301
- t.string "iso_code_2"
302
- t.string "iso_code_3"
303
- t.boolean "display", :default => true
304
- t.integer "external_id"
305
- t.datetime "created_at"
306
- end
307
-
308
- add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
309
- add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
310
-
311
- create_table "geo_zones", :force => true do |t|
312
- t.integer "geo_country_id"
313
- t.string "zone_code", :default => "2"
314
- t.string "zone_name"
315
- t.datetime "created_at"
316
- end
317
-
318
- add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
319
- add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
320
- add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
321
-
322
- create_table "groups", :force => true do |t|
323
- t.string "description"
324
- t.datetime "created_at", :null => false
325
- t.datetime "updated_at", :null => false
326
- end
327
-
328
- create_table "individuals", :force => true do |t|
329
- t.integer "party_id"
330
- t.string "current_last_name"
331
- t.string "current_first_name"
332
- t.string "current_middle_name"
333
- t.string "current_personal_title"
334
- t.string "current_suffix"
335
- t.string "current_nickname"
336
- t.string "gender", :limit => 1
337
- t.date "birth_date"
338
- t.decimal "height", :precision => 5, :scale => 2
339
- t.integer "weight"
340
- t.string "mothers_maiden_name"
341
- t.string "marital_status", :limit => 1
342
- t.string "social_security_number"
343
- t.integer "current_passport_number"
344
- t.date "current_passport_expire_date"
345
- t.integer "total_years_work_experience"
346
- t.string "comments"
347
- t.string "encrypted_ssn"
348
- t.string "temp_ssn"
349
- t.string "salt"
350
- t.string "ssn_last_four"
351
- t.datetime "created_at", :null => false
352
- t.datetime "updated_at", :null => false
353
- end
354
-
355
- add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
356
-
357
- create_table "money", :force => true do |t|
358
- t.string "description"
359
- t.decimal "amount", :precision => 8, :scale => 2
360
- t.integer "currency_id"
361
- t.datetime "created_at", :null => false
362
- t.datetime "updated_at", :null => false
363
- end
364
-
365
- add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
366
-
367
- create_table "note_types", :force => true do |t|
368
- t.integer "parent_id"
369
- t.integer "lft"
370
- t.integer "rgt"
371
- t.string "description"
372
- t.string "internal_identifier"
373
- t.string "external_identifier"
374
- t.integer "note_type_record_id"
375
- t.string "note_type_record_type"
376
- t.datetime "created_at", :null => false
377
- t.datetime "updated_at", :null => false
378
- end
379
-
380
- add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
381
-
382
- create_table "notes", :force => true do |t|
383
- t.integer "created_by_id"
384
- t.text "content"
385
- t.integer "noted_record_id"
386
- t.string "noted_record_type"
387
- t.integer "note_type_id"
388
- t.datetime "created_at", :null => false
389
- t.datetime "updated_at", :null => false
390
- end
391
-
392
- add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
393
- add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
394
- add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
395
-
396
- create_table "organizations", :force => true do |t|
397
- t.string "description"
398
- t.string "tax_id_number"
399
- t.datetime "created_at", :null => false
400
- t.datetime "updated_at", :null => false
401
- end
402
-
403
- create_table "parties", :force => true do |t|
404
- t.string "description"
405
- t.integer "business_party_id"
406
- t.string "business_party_type"
407
- t.integer "list_view_image_id"
408
- t.string "enterprise_identifier"
409
- t.datetime "created_at", :null => false
410
- t.datetime "updated_at", :null => false
411
- end
412
-
413
- add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
414
-
415
- create_table "parties_security_roles", :id => false, :force => true do |t|
416
- t.integer "party_id"
417
- t.integer "security_role_id"
418
- end
419
-
420
- add_index "parties_security_roles", ["party_id"], :name => "index_parties_security_roles_on_party_id"
421
- add_index "parties_security_roles", ["security_role_id"], :name => "index_parties_security_roles_on_security_role_id"
422
-
423
- create_table "party_relationships", :force => true do |t|
424
- t.string "description"
425
- t.integer "party_id_from"
426
- t.integer "party_id_to"
427
- t.integer "role_type_id_from"
428
- t.integer "role_type_id_to"
429
- t.integer "status_type_id"
430
- t.integer "priority_type_id"
431
- t.integer "relationship_type_id"
432
- t.date "from_date"
433
- t.date "thru_date"
434
- t.string "external_identifier"
435
- t.string "external_id_source"
436
- t.datetime "created_at", :null => false
437
- t.datetime "updated_at", :null => false
438
- end
439
-
440
- add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
441
- add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
442
- add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
443
-
444
- create_table "party_resource_availabilities", :force => true do |t|
445
- t.datetime "from_date"
446
- t.datetime "to_date"
447
- t.integer "party_id"
448
- t.integer "pra_type_id"
449
- t.datetime "created_at", :null => false
450
- t.datetime "updated_at", :null => false
451
- end
452
-
453
- add_index "party_resource_availabilities", ["from_date"], :name => "index_party_resource_availabilities_on_from_date"
454
- add_index "party_resource_availabilities", ["party_id"], :name => "index_party_resource_availabilities_on_party_id"
455
- add_index "party_resource_availabilities", ["pra_type_id"], :name => "index_party_resource_availabilities_on_pra_type_id"
456
- add_index "party_resource_availabilities", ["to_date"], :name => "index_party_resource_availabilities_on_to_date"
457
-
458
- create_table "party_resource_availability_types", :force => true do |t|
459
- t.string "description"
460
- t.string "internal_identifier"
461
- t.datetime "created_at", :null => false
462
- t.datetime "updated_at", :null => false
463
- end
464
-
465
- add_index "party_resource_availability_types", ["description"], :name => "index_party_resource_availability_types_on_description"
466
- add_index "party_resource_availability_types", ["internal_identifier"], :name => "index_party_resource_availability_types_on_internal_identifier"
467
-
468
- create_table "party_roles", :force => true do |t|
469
- t.string "type"
470
- t.integer "party_id"
471
- t.integer "role_type_id"
472
- t.datetime "created_at", :null => false
473
- t.datetime "updated_at", :null => false
474
- end
475
-
476
- add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
477
- add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
478
-
479
- create_table "party_search_facts", :force => true do |t|
480
- t.integer "party_id"
481
- t.string "eid"
482
- t.string "type"
483
- t.text "roles"
484
- t.string "party_description"
485
- t.string "party_business_party_type"
486
- t.string "user_login"
487
- t.string "individual_current_last_name"
488
- t.string "individual_current_first_name"
489
- t.string "individual_current_middle_name"
490
- t.string "individual_birth_date"
491
- t.string "individual_ssn"
492
- t.string "party_phone_number"
493
- t.string "party_email_address"
494
- t.string "party_address_1"
495
- t.string "party_address_2"
496
- t.string "party_primary_address_city"
497
- t.string "party_primary_address_state"
498
- t.string "party_primary_address_zip"
499
- t.string "party_primary_address_country"
500
- t.boolean "user_enabled"
501
- t.string "user_type"
502
- t.boolean "reindex"
503
- t.datetime "created_at", :null => false
504
- t.datetime "updated_at", :null => false
505
- end
506
-
507
- create_table "phone_numbers", :force => true do |t|
508
- t.string "phone_number"
509
- t.string "description"
510
- t.datetime "created_at", :null => false
511
- t.datetime "updated_at", :null => false
512
- end
513
-
514
- create_table "postal_addresses", :force => true do |t|
515
- t.string "address_line_1"
516
- t.string "address_line_2"
517
- t.string "city"
518
- t.string "state"
519
- t.string "zip"
520
- t.string "country"
521
- t.string "description"
522
- t.integer "geo_country_id"
523
- t.integer "geo_zone_id"
524
- t.datetime "created_at", :null => false
525
- t.datetime "updated_at", :null => false
526
- end
527
-
528
- add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
529
- add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
530
-
531
- create_table "relationship_types", :force => true do |t|
532
- t.integer "parent_id"
533
- t.integer "lft"
534
- t.integer "rgt"
535
- t.integer "valid_from_role_type_id"
536
- t.integer "valid_to_role_type_id"
537
- t.string "name"
538
- t.string "description"
539
- t.string "internal_identifier"
540
- t.string "external_identifier"
541
- t.string "external_id_source"
542
- t.datetime "created_at", :null => false
543
- t.datetime "updated_at", :null => false
544
- end
545
-
546
- add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
547
- add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
548
-
549
- create_table "role_types", :force => true do |t|
550
- t.integer "parent_id"
551
- t.integer "lft"
552
- t.integer "rgt"
553
- t.string "description"
554
- t.string "comments"
555
- t.string "internal_identifier"
556
- t.string "external_identifier"
557
- t.string "external_id_source"
558
- t.datetime "created_at", :null => false
559
- t.datetime "updated_at", :null => false
560
- end
561
-
562
- create_table "scope_types", :force => true do |t|
563
- t.string "description"
564
- t.string "internal_identifier"
565
- t.datetime "created_at", :null => false
566
- t.datetime "updated_at", :null => false
567
- end
568
-
569
- add_index "scope_types", ["internal_identifier"], :name => "index_scope_types_on_internal_identifier"
570
-
571
- create_table "security_roles", :force => true do |t|
572
- t.string "description"
573
- t.string "internal_identifier"
574
- t.string "external_identifier"
575
- t.string "external_id_source"
576
- t.datetime "created_at", :null => false
577
- t.datetime "updated_at", :null => false
578
- end
579
-
580
- create_table "sessions", :force => true do |t|
581
- t.string "session_id", :null => false
582
- t.text "data"
583
- t.datetime "created_at", :null => false
584
- t.datetime "updated_at", :null => false
585
- end
586
-
587
- add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
588
- add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
589
-
590
- create_table "users", :force => true do |t|
591
- t.string "username"
592
- t.string "email"
593
- t.integer "party_id"
594
- t.string "type"
595
- t.string "salt"
596
- t.string "crypted_password"
597
- t.datetime "last_login_at"
598
- t.datetime "last_logout_at"
599
- t.datetime "last_activity_at"
600
- t.integer "failed_logins_count", :default => 0
601
- t.datetime "lock_expires_at"
602
- t.string "remember_me_token"
603
- t.datetime "remember_me_token_expires_at"
604
- t.string "reset_password_token"
605
- t.datetime "reset_password_token_expires_at"
606
- t.datetime "reset_password_email_sent_at"
607
- t.string "activation_state"
608
- t.string "activation_token"
609
- t.datetime "activation_token_expires_at"
610
- t.string "security_question_1"
611
- t.string "security_answer_1"
612
- t.string "security_question_2"
613
- t.string "security_answer_2"
614
- t.datetime "created_at", :null => false
615
- t.datetime "updated_at", :null => false
616
- end
617
-
618
- add_index "users", ["activation_token"], :name => "index_users_on_activation_token"
619
- add_index "users", ["email"], :name => "index_users_on_email", :unique => true
620
- add_index "users", ["last_logout_at", "last_activity_at"], :name => "activity_idx"
621
- add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token"
622
- add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token"
623
- add_index "users", ["username"], :name => "index_users_on_username", :unique => true
624
-
625
- create_table "valid_note_types", :force => true do |t|
626
- t.integer "valid_note_type_record_id"
627
- t.string "valid_note_type_record_type"
628
- t.integer "note_type_id"
629
- t.datetime "created_at", :null => false
630
- t.datetime "updated_at", :null => false
631
- end
632
-
633
- add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
634
- add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
635
-
636
- create_table "valid_work_assignment_attributes", :force => true do |t|
637
- t.integer "valid_work_assignment_id"
638
- t.string "name"
639
- t.string "type"
640
- t.string "value"
641
- t.datetime "created_at", :null => false
642
- t.datetime "updated_at", :null => false
643
- end
644
-
645
- create_table "valid_work_assignments", :force => true do |t|
646
- t.integer "role_type_id"
647
- t.integer "work_requirement_id"
648
- t.datetime "created_at", :null => false
649
- t.datetime "updated_at", :null => false
650
- end
651
-
652
- create_table "view_types", :force => true do |t|
653
- t.string "internal_identifier"
654
- t.string "description"
655
- t.datetime "created_at", :null => false
656
- t.datetime "updated_at", :null => false
657
- end
658
-
659
- create_table "work_effort_assignments", :force => true do |t|
660
- t.integer "work_effort_id"
661
- t.datetime "assigned_at"
662
- t.datetime "assigned_from"
663
- t.datetime "assigned_thru"
664
- t.datetime "unassigned_at"
665
- t.integer "assigned_to_id"
666
- t.string "assigned_to_type"
667
- t.integer "assigned_by_id"
668
- t.string "assigned_by_type"
669
- t.datetime "created_at", :null => false
670
- t.datetime "updated_at", :null => false
671
- end
672
-
673
- add_index "work_effort_assignments", ["assigned_from"], :name => "index_work_effort_assignments_on_assigned_from"
674
- add_index "work_effort_assignments", ["assigned_thru"], :name => "index_work_effort_assignments_on_assigned_thru"
675
- add_index "work_effort_assignments", ["assigned_to_id", "assigned_to_type"], :name => "assigned_to"
676
- add_index "work_effort_assignments", ["work_effort_id"], :name => "index_work_effort_assignments_on_work_effort_id"
677
-
678
- create_table "work_effort_status_types", :force => true do |t|
679
- t.string "internal_identifier"
680
- t.string "description"
681
- t.integer "next_status_id"
682
- t.integer "previous_status_id"
683
- t.datetime "created_at", :null => false
684
- t.datetime "updated_at", :null => false
685
- end
686
-
687
- add_index "work_effort_status_types", ["description"], :name => "index_work_effort_status_types_on_description"
688
- add_index "work_effort_status_types", ["internal_identifier"], :name => "index_work_effort_status_types_on_internal_identifier"
689
-
690
- create_table "work_effort_statuses", :force => true do |t|
691
- t.datetime "started_at"
692
- t.datetime "finished_at"
693
- t.integer "work_effort_id"
694
- t.integer "work_effort_status_type_id"
695
- t.datetime "created_at", :null => false
696
- t.datetime "updated_at", :null => false
697
- end
698
-
699
- add_index "work_effort_statuses", ["work_effort_id"], :name => "index_work_effort_statuses_on_work_effort_id"
700
- add_index "work_effort_statuses", ["work_effort_status_type_id"], :name => "index_work_effort_statuses_on_work_effort_status_type_id"
701
-
702
- create_table "work_efforts", :force => true do |t|
703
- t.string "description"
704
- t.string "type"
705
- t.datetime "started_at"
706
- t.datetime "finished_at"
707
- t.integer "projected_completion_time"
708
- t.integer "actual_completion_time"
709
- t.datetime "created_at", :null => false
710
- t.datetime "updated_at", :null => false
711
- t.integer "facility_id"
712
- t.string "facility_type"
713
- t.integer "work_effort_record_id"
714
- t.string "work_effort_record_type"
715
- t.integer "projected_cost_id"
716
- t.integer "actual_cost_id"
717
- t.integer "parent_id"
718
- t.integer "lft"
719
- t.integer "rgt"
720
- end
721
-
722
- add_index "work_efforts", ["facility_type", "facility_id"], :name => "facility"
723
- add_index "work_efforts", ["finished_at"], :name => "index_work_efforts_on_finished_at"
724
- add_index "work_efforts", ["work_effort_record_id", "work_effort_record_type"], :name => "work_effort_record_id_type"
725
-
726
- create_table "work_requirement_work_effort_status_types", :force => true do |t|
727
- t.datetime "created_at", :null => false
728
- t.datetime "updated_at", :null => false
729
- t.integer "work_requirement_id"
730
- t.integer "work_effort_status_type_id"
731
- t.boolean "is_initial_status"
732
- end
733
-
734
- create_table "work_requirements", :force => true do |t|
735
- t.string "description"
736
- t.string "type"
737
- t.integer "projected_completion_time"
738
- t.datetime "created_at", :null => false
739
- t.datetime "updated_at", :null => false
740
- t.integer "work_requirement_record_id"
741
- t.string "work_requirement_record_type"
742
- t.integer "facility_id"
743
- t.string "facility_type"
744
- t.integer "cost_id"
745
- t.integer "parent_id"
746
- t.integer "lft"
747
- t.integer "rgt"
748
- end
749
-
750
- end