erp_app 3.1.13 → 3.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/app/controllers/erp_app/desktop/security_management/users_controller.rb +1 -1
  2. data/app/models/configuration.rb +7 -1
  3. data/lib/erp_app/version.rb +1 -1
  4. data/public/javascripts/erp_app/desktop/applications/security_management/capabilities_widget.js +1 -1
  5. data/public/javascripts/erp_app/desktop/applications/security_management/groups_widget.js +1 -1
  6. data/public/javascripts/erp_app/desktop/applications/security_management/roles_widget.js +1 -1
  7. data/public/javascripts/erp_app/desktop/applications/security_management/users_widget.js +1 -1
  8. data/public/javascripts/erp_app/shared/dynamic_editable_grid.js +1 -0
  9. data/public/javascripts/erp_app/shared/dynamic_editable_grid_loader_panel.js +1 -0
  10. data/public/javascripts/erp_app/shared/file_manager_tree.js +13 -14
  11. data/spec/dummy/db/data_migrations/20130422163128_add_usd_currency.erp_base_erp_svcs.rb +12 -0
  12. data/spec/dummy/db/data_migrations/20130422163129_add_iso_codes.erp_base_erp_svcs.rb +19 -0
  13. data/spec/dummy/db/data_migrations/20130422163130_setup_compass_ae_instance.erp_base_erp_svcs.rb +21 -0
  14. data/spec/dummy/db/data_migrations/20130422163131_upgrade_compass_ae_instances_data.erp_base_erp_svcs.rb +19 -0
  15. data/spec/dummy/db/data_migrations/20130422163132_add_guid_to_instances.erp_base_erp_svcs.rb +10 -0
  16. data/spec/dummy/db/data_migrations/20130422163133_create_capability_scope_types.erp_tech_svcs.rb +15 -0
  17. data/spec/dummy/db/data_migrations/20130422163134_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +16 -0
  18. data/spec/dummy/db/data_migrations/20130422163135_setup_audit_log_types.erp_tech_svcs.rb +22 -0
  19. data/spec/dummy/db/data_migrations/20130422163136_create_group_relationship_and_role_types.erp_tech_svcs.rb +20 -0
  20. data/spec/dummy/db/data_migrations/20130422163137_note_capabilities.erp_tech_svcs.rb +24 -0
  21. data/spec/dummy/db/data_migrations/20130422163138_erp_app_setup.erp_app.rb +252 -0
  22. data/spec/dummy/db/data_migrations/20130422163139_update_preferences.erp_app.rb +53 -0
  23. data/spec/dummy/db/data_migrations/20130422163140_create_desktop_app_audit_log_viewer.erp_app.rb +24 -0
  24. data/spec/dummy/db/data_migrations/20130422163141_add_file_manager_application.erp_app.rb +32 -0
  25. data/spec/dummy/db/data_migrations/20130422163142_add_default_capabilities.erp_app.rb +23 -0
  26. data/spec/dummy/db/data_migrations/20130422163143_add_new_contact_widgets.erp_app.rb +42 -0
  27. data/spec/dummy/db/data_migrations/20130422163144_add_userinfo_widget.erp_app.rb +29 -0
  28. data/spec/dummy/db/data_migrations/20130422163145_create_party_and_role_type_for_communication_events.erp_app.rb +11 -0
  29. data/spec/dummy/db/data_migrations/20130422163146_create_user_management_mobile_application.erp_app.rb +17 -0
  30. data/spec/dummy/db/data_migrations/20130422163147_create_configuration_management_desktop_application.erp_app.rb +27 -0
  31. data/spec/dummy/db/data_migrations/20130422163148_create_job_tracker_desktop_application.erp_app.rb +23 -0
  32. data/spec/dummy/db/data_migrations/20130422163149_created_tracked_jobs.erp_app.rb +15 -0
  33. data/spec/dummy/db/data_migrations/20130422163150_upgrade_remove_system_mgmt_app.erp_app.rb +16 -0
  34. data/spec/dummy/db/data_migrations/20130422163151_create_security_management_desktop_application.erp_app.rb +29 -0
  35. data/spec/dummy/db/data_migrations/20130422163152_add_job_tracker_mobile_app.erp_app.rb +17 -0
  36. data/spec/dummy/db/migrate/20130422163121_base_erp_services.erp_base_erp_svcs.rb +486 -0
  37. data/spec/dummy/db/migrate/20130422163122_add_txn_status.erp_base_erp_svcs.rb +37 -0
  38. data/spec/dummy/db/migrate/20130422163123_upgrade_compass_ae_instances.erp_base_erp_svcs.rb +34 -0
  39. data/spec/dummy/db/migrate/20130422163124_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb +17 -0
  40. data/spec/dummy/db/migrate/20130422163125_add_long_lat_to_address.erp_base_erp_svcs.rb +16 -0
  41. data/spec/dummy/db/migrate/20130422163126_base_tech_services.erp_tech_svcs.rb +271 -0
  42. data/spec/dummy/db/migrate/20130422163127_create_has_attribute_tables.erp_tech_svcs.rb +39 -0
  43. data/spec/dummy/db/migrate/20130422163128_create_groups.erp_tech_svcs.rb +19 -0
  44. data/spec/dummy/db/migrate/20130422163129_upgrade_security.erp_tech_svcs.rb +54 -0
  45. data/spec/dummy/db/migrate/20130422163130_upgrade_security2.erp_tech_svcs.rb +275 -0
  46. data/spec/dummy/db/migrate/20130422163131_add_queue_to_delayed_jobs.erp_tech_svcs.rb +14 -0
  47. data/spec/dummy/db/migrate/20130422163132_base_app_framework.erp_app.rb +276 -0
  48. data/spec/dummy/db/migrate/20130422163133_add_job_tracker.erp_app.rb +20 -0
  49. data/spec/dummy/db/migrate/20130422163134_update_mobile_application.erp_app.rb +28 -0
  50. data/spec/dummy/db/schema.rb +883 -0
  51. data/spec/dummy/db/spec.sqlite3 +0 -0
  52. metadata +85 -3
@@ -0,0 +1,20 @@
1
+ # This migration comes from erp_app (originally 20120920145259)
2
+ class AddJobTracker < ActiveRecord::Migration
3
+ def up
4
+ unless table_exists?(:job_trackers)
5
+ create_table :job_trackers do |t|
6
+ t.string :job_name
7
+ t.string :job_klass
8
+ t.string :run_time
9
+ t.datetime :last_run_at
10
+ t.datetime :next_run_at
11
+ end
12
+ end
13
+ end
14
+
15
+ def down
16
+ if table_exists?(:job_trackers)
17
+ drop_table :job_trackers
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,28 @@
1
+ # This migration comes from erp_app (originally 20130410182333)
2
+ class UpdateMobileApplication < ActiveRecord::Migration
3
+ def up
4
+ unless columns(:applications).collect { |c| c.name }.include?('xtype')
5
+ rename_column :applications, :base_url, :xtype
6
+
7
+ user_management = MobileApplication.find_by_internal_identifier('user_management')
8
+ if user_management.nil?
9
+ MobileApplication.create(
10
+ :description => 'User Mgmt',
11
+ :icon => 'icon-user',
12
+ :internal_identifier => 'user_management',
13
+ :xtype => 'compass-erpapp-mobile-usermanagement-application'
14
+ )
15
+ else
16
+ user_management.description = 'User Mgmt'
17
+ user_management.xtype = 'compass-erpapp-mobile-usermanagement-application'
18
+ user_management.save
19
+ end
20
+ end
21
+ end
22
+
23
+ def down
24
+ if columns(:applications).collect { |c| c.name }.include?('xtype')
25
+ rename_column :applications, :xtype, :base_url
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,883 @@
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 => 20130422163134) do
15
+
16
+ create_table "app_containers", :force => true do |t|
17
+ t.integer "user_id"
18
+ t.string "description"
19
+ t.string "internal_identifier"
20
+ t.string "type"
21
+ t.datetime "created_at", :null => false
22
+ t.datetime "updated_at", :null => false
23
+ end
24
+
25
+ add_index "app_containers", ["type"], :name => "index_app_containers_on_type"
26
+ add_index "app_containers", ["user_id"], :name => "index_app_containers_on_user_id"
27
+
28
+ create_table "app_containers_applications", :id => false, :force => true do |t|
29
+ t.integer "app_container_id"
30
+ t.integer "application_id"
31
+ end
32
+
33
+ add_index "app_containers_applications", ["app_container_id"], :name => "index_app_containers_applications_on_app_container_id"
34
+ add_index "app_containers_applications", ["application_id"], :name => "index_app_containers_applications_on_application_id"
35
+
36
+ create_table "applications", :force => true do |t|
37
+ t.string "description"
38
+ t.string "icon"
39
+ t.string "internal_identifier"
40
+ t.string "javascript_class_name"
41
+ t.string "shortcut_id"
42
+ t.string "xtype"
43
+ t.string "type"
44
+ t.datetime "created_at", :null => false
45
+ t.datetime "updated_at", :null => false
46
+ end
47
+
48
+ create_table "applications_widgets", :id => false, :force => true do |t|
49
+ t.integer "application_id"
50
+ t.integer "widget_id"
51
+ end
52
+
53
+ add_index "applications_widgets", ["application_id"], :name => "index_applications_widgets_on_application_id"
54
+ add_index "applications_widgets", ["widget_id"], :name => "index_applications_widgets_on_widget_id"
55
+
56
+ create_table "attribute_types", :force => true do |t|
57
+ t.string "internal_identifier"
58
+ t.string "description"
59
+ t.string "data_type"
60
+ t.datetime "created_at", :null => false
61
+ t.datetime "updated_at", :null => false
62
+ end
63
+
64
+ add_index "attribute_types", ["internal_identifier"], :name => ":attribute_types_iid_idx"
65
+
66
+ create_table "attribute_values", :force => true do |t|
67
+ t.integer "attributed_record_id"
68
+ t.string "attributed_record_type"
69
+ t.integer "attribute_type_id"
70
+ t.string "value"
71
+ t.datetime "created_at", :null => false
72
+ t.datetime "updated_at", :null => false
73
+ end
74
+
75
+ add_index "attribute_values", ["attribute_type_id"], :name => "attribute_values_attributed_type_idx"
76
+ add_index "attribute_values", ["attributed_record_id", "attributed_record_type"], :name => "attribute_values_attributed_record_idx"
77
+ add_index "attribute_values", ["value"], :name => "attribute_values_value_idx"
78
+
79
+ create_table "audit_log_item_types", :force => true do |t|
80
+ t.string "internal_identifier"
81
+ t.string "external_identifier"
82
+ t.string "external_id_source"
83
+ t.string "description"
84
+ t.string "comments"
85
+ t.integer "parent_id"
86
+ t.integer "lft"
87
+ t.integer "rgt"
88
+ t.datetime "created_at", :null => false
89
+ t.datetime "updated_at", :null => false
90
+ end
91
+
92
+ create_table "audit_log_items", :force => true do |t|
93
+ t.integer "audit_log_id"
94
+ t.integer "audit_log_item_type_id"
95
+ t.string "audit_log_item_value"
96
+ t.string "description"
97
+ t.datetime "created_at", :null => false
98
+ t.datetime "updated_at", :null => false
99
+ end
100
+
101
+ create_table "audit_log_types", :force => true do |t|
102
+ t.string "description"
103
+ t.string "error_code"
104
+ t.string "comments"
105
+ t.string "internal_identifier"
106
+ t.string "external_identifier"
107
+ t.string "external_id_source"
108
+ t.integer "parent_id"
109
+ t.integer "lft"
110
+ t.integer "rgt"
111
+ t.datetime "created_at", :null => false
112
+ t.datetime "updated_at", :null => false
113
+ end
114
+
115
+ create_table "audit_logs", :force => true do |t|
116
+ t.string "application"
117
+ t.string "description"
118
+ t.integer "party_id"
119
+ t.text "additional_info"
120
+ t.integer "audit_log_type_id"
121
+ t.integer "event_record_id"
122
+ t.string "event_record_type"
123
+ t.datetime "created_at", :null => false
124
+ t.datetime "updated_at", :null => false
125
+ end
126
+
127
+ add_index "audit_logs", ["event_record_id", "event_record_type"], :name => "event_record_index"
128
+ add_index "audit_logs", ["party_id"], :name => "index_audit_logs_on_party_id"
129
+
130
+ create_table "capabilities", :force => true do |t|
131
+ t.string "description"
132
+ t.integer "capability_type_id"
133
+ t.string "capability_resource_type"
134
+ t.integer "capability_resource_id"
135
+ t.integer "scope_type_id"
136
+ t.text "scope_query"
137
+ t.datetime "created_at", :null => false
138
+ t.datetime "updated_at", :null => false
139
+ end
140
+
141
+ add_index "capabilities", ["capability_resource_id", "capability_resource_type"], :name => "capability_resource_index"
142
+ add_index "capabilities", ["capability_type_id"], :name => "index_capabilities_on_capability_type_id"
143
+ add_index "capabilities", ["scope_type_id"], :name => "index_capabilities_on_scope_type_id"
144
+
145
+ create_table "capability_accessors", :force => true do |t|
146
+ t.string "capability_accessor_record_type"
147
+ t.integer "capability_accessor_record_id"
148
+ t.integer "capability_id"
149
+ t.datetime "created_at", :null => false
150
+ t.datetime "updated_at", :null => false
151
+ end
152
+
153
+ add_index "capability_accessors", ["capability_accessor_record_id", "capability_accessor_record_type"], :name => "capability_accessor_record_index"
154
+ add_index "capability_accessors", ["capability_id"], :name => "index_capability_accessors_on_capability_id"
155
+
156
+ create_table "capability_types", :force => true do |t|
157
+ t.string "internal_identifier"
158
+ t.string "description"
159
+ t.datetime "created_at", :null => false
160
+ t.datetime "updated_at", :null => false
161
+ end
162
+
163
+ create_table "capable_models", :force => true do |t|
164
+ t.integer "capable_model_record_id"
165
+ t.string "capable_model_record_type"
166
+ t.datetime "created_at", :null => false
167
+ t.datetime "updated_at", :null => false
168
+ end
169
+
170
+ add_index "capable_models", ["capable_model_record_id", "capable_model_record_type"], :name => "capable_model_record_idx"
171
+
172
+ create_table "categories", :force => true do |t|
173
+ t.string "description"
174
+ t.string "external_identifier"
175
+ t.datetime "from_date"
176
+ t.datetime "to_date"
177
+ t.string "internal_identifier"
178
+ t.integer "category_record_id"
179
+ t.string "category_record_type"
180
+ t.integer "parent_id"
181
+ t.integer "lft"
182
+ t.integer "rgt"
183
+ t.datetime "created_at", :null => false
184
+ t.datetime "updated_at", :null => false
185
+ end
186
+
187
+ add_index "categories", ["category_record_id", "category_record_type"], :name => "category_polymorphic"
188
+
189
+ create_table "category_classifications", :force => true do |t|
190
+ t.integer "category_id"
191
+ t.string "classification_type"
192
+ t.integer "classification_id"
193
+ t.datetime "from_date"
194
+ t.datetime "to_date"
195
+ t.datetime "created_at", :null => false
196
+ t.datetime "updated_at", :null => false
197
+ end
198
+
199
+ add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
200
+
201
+ create_table "compass_ae_instance_party_roles", :force => true do |t|
202
+ t.string "description"
203
+ t.integer "compass_ae_instance_id"
204
+ t.integer "party_id"
205
+ t.integer "role_type_id"
206
+ t.datetime "created_at", :null => false
207
+ t.datetime "updated_at", :null => false
208
+ end
209
+
210
+ add_index "compass_ae_instance_party_roles", ["compass_ae_instance_id"], :name => "compass_ae_instance_id_idx"
211
+ add_index "compass_ae_instance_party_roles", ["party_id"], :name => "party_id_idx"
212
+ add_index "compass_ae_instance_party_roles", ["role_type_id"], :name => "role_type_id_idx"
213
+
214
+ create_table "compass_ae_instances", :force => true do |t|
215
+ t.string "description"
216
+ t.string "internal_identifier"
217
+ t.decimal "version", :precision => 8, :scale => 3
218
+ t.string "type"
219
+ t.string "schema", :default => "public"
220
+ t.integer "parent_id"
221
+ t.datetime "created_at", :null => false
222
+ t.datetime "updated_at", :null => false
223
+ t.string "guid"
224
+ end
225
+
226
+ add_index "compass_ae_instances", ["guid"], :name => "guid_idx"
227
+ add_index "compass_ae_instances", ["internal_identifier"], :name => "iid_idx"
228
+ add_index "compass_ae_instances", ["parent_id"], :name => "parent_id_idx"
229
+ add_index "compass_ae_instances", ["schema"], :name => "schema_idx"
230
+ add_index "compass_ae_instances", ["type"], :name => "type_idx"
231
+
232
+ create_table "configuration_item_types", :force => true do |t|
233
+ t.integer "parent_id"
234
+ t.integer "lft"
235
+ t.integer "rgt"
236
+ t.string "description"
237
+ t.string "internal_identifier"
238
+ t.boolean "allow_user_defined_options", :default => false
239
+ t.boolean "is_multi_optional", :default => false
240
+ t.datetime "created_at", :null => false
241
+ t.datetime "updated_at", :null => false
242
+ end
243
+
244
+ create_table "configuration_item_types_configuration_options", :force => true do |t|
245
+ t.integer "configuration_item_type_id"
246
+ t.integer "configuration_option_id"
247
+ t.boolean "is_default", :default => false
248
+ t.datetime "created_at", :null => false
249
+ t.datetime "updated_at", :null => false
250
+ end
251
+
252
+ add_index "configuration_item_types_configuration_options", ["configuration_item_type_id"], :name => "conf_item_type_conf_opt_id_item_idx"
253
+ add_index "configuration_item_types_configuration_options", ["configuration_option_id"], :name => "conf_item_type_conf_opt_id_opt_idx"
254
+
255
+ create_table "configuration_item_types_configurations", :id => false, :force => true do |t|
256
+ t.integer "configuration_item_type_id"
257
+ t.integer "configuration_id"
258
+ end
259
+
260
+ add_index "configuration_item_types_configurations", ["configuration_id"], :name => "conf_id_idx"
261
+ add_index "configuration_item_types_configurations", ["configuration_item_type_id", "configuration_id"], :name => "conf_config_type_uniq_idx", :unique => true
262
+ add_index "configuration_item_types_configurations", ["configuration_item_type_id"], :name => "conf_conf_type_id_item_idx"
263
+
264
+ create_table "configuration_items", :force => true do |t|
265
+ t.integer "configuration_id"
266
+ t.integer "configuration_item_type_id"
267
+ t.integer "configuration_option_id"
268
+ t.datetime "created_at", :null => false
269
+ t.datetime "updated_at", :null => false
270
+ end
271
+
272
+ add_index "configuration_items", ["configuration_id"], :name => "index_configuration_items_on_configuration_id"
273
+ add_index "configuration_items", ["configuration_item_type_id"], :name => "index_configuration_items_on_configuration_item_type_id"
274
+ add_index "configuration_items", ["configuration_option_id"], :name => "index_configuration_items_on_configuration_option_id"
275
+
276
+ create_table "configuration_items_configuration_options", :id => false, :force => true do |t|
277
+ t.integer "configuration_item_id"
278
+ t.integer "configuration_option_id"
279
+ end
280
+
281
+ add_index "configuration_items_configuration_options", ["configuration_item_id"], :name => "conf_item_conf_opt_id_item_idx"
282
+ add_index "configuration_items_configuration_options", ["configuration_option_id"], :name => "conf_item_conf_opt_id_opt_idx"
283
+
284
+ create_table "configuration_options", :force => true do |t|
285
+ t.string "description"
286
+ t.string "internal_identifier"
287
+ t.string "value"
288
+ t.text "comment"
289
+ t.boolean "user_defined", :default => false
290
+ t.datetime "created_at", :null => false
291
+ t.datetime "updated_at", :null => false
292
+ end
293
+
294
+ add_index "configuration_options", ["internal_identifier"], :name => "index_configuration_options_on_internal_identifier"
295
+ add_index "configuration_options", ["user_defined"], :name => "index_configuration_options_on_user_defined"
296
+ add_index "configuration_options", ["value"], :name => "index_configuration_options_on_value"
297
+
298
+ create_table "configurations", :force => true do |t|
299
+ t.string "description"
300
+ t.string "internal_identifier"
301
+ t.boolean "active"
302
+ t.boolean "is_template", :default => false
303
+ t.datetime "created_at", :null => false
304
+ t.datetime "updated_at", :null => false
305
+ end
306
+
307
+ add_index "configurations", ["is_template"], :name => "index_configurations_on_is_template"
308
+
309
+ create_table "contact_purposes", :force => true do |t|
310
+ t.integer "parent_id"
311
+ t.integer "lft"
312
+ t.integer "rgt"
313
+ t.string "description"
314
+ t.string "comments"
315
+ t.string "internal_identifier"
316
+ t.string "external_identifier"
317
+ t.string "external_id_source"
318
+ t.datetime "created_at", :null => false
319
+ t.datetime "updated_at", :null => false
320
+ end
321
+
322
+ add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
323
+
324
+ create_table "contact_purposes_contacts", :id => false, :force => true do |t|
325
+ t.integer "contact_id"
326
+ t.integer "contact_purpose_id"
327
+ end
328
+
329
+ add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
330
+
331
+ create_table "contact_types", :force => true do |t|
332
+ t.integer "parent_id"
333
+ t.integer "lft"
334
+ t.integer "rgt"
335
+ t.string "description"
336
+ t.string "comments"
337
+ t.string "internal_identifier"
338
+ t.string "external_identifier"
339
+ t.string "external_id_source"
340
+ t.datetime "created_at", :null => false
341
+ t.datetime "updated_at", :null => false
342
+ end
343
+
344
+ add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
345
+
346
+ create_table "contacts", :force => true do |t|
347
+ t.integer "party_id"
348
+ t.integer "contact_mechanism_id"
349
+ t.string "contact_mechanism_type"
350
+ t.string "external_identifier"
351
+ t.string "external_id_source"
352
+ t.datetime "created_at", :null => false
353
+ t.datetime "updated_at", :null => false
354
+ end
355
+
356
+ add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
357
+ add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
358
+
359
+ create_table "currencies", :force => true do |t|
360
+ t.string "name"
361
+ t.string "definition"
362
+ t.string "internal_identifier"
363
+ t.string "numeric_code"
364
+ t.string "major_unit_symbol"
365
+ t.string "minor_unit_symbol"
366
+ t.string "ratio_of_minor_unit_to_major_unit"
367
+ t.string "postfix_label"
368
+ t.datetime "introduction_date"
369
+ t.datetime "expiration_date"
370
+ t.datetime "created_at", :null => false
371
+ t.datetime "updated_at", :null => false
372
+ end
373
+
374
+ add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
375
+
376
+ create_table "delayed_jobs", :force => true do |t|
377
+ t.integer "priority", :default => 0
378
+ t.integer "attempts", :default => 0
379
+ t.text "handler"
380
+ t.text "last_error"
381
+ t.datetime "run_at"
382
+ t.datetime "locked_at"
383
+ t.datetime "failed_at"
384
+ t.string "locked_by"
385
+ t.string "queue"
386
+ t.datetime "created_at", :null => false
387
+ t.datetime "updated_at", :null => false
388
+ end
389
+
390
+ add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
391
+
392
+ create_table "descriptive_assets", :force => true do |t|
393
+ t.integer "view_type_id"
394
+ t.string "internal_identifier"
395
+ t.text "description"
396
+ t.string "external_identifier"
397
+ t.string "external_id_source"
398
+ t.integer "described_record_id"
399
+ t.string "described_record_type"
400
+ t.datetime "created_at", :null => false
401
+ t.datetime "updated_at", :null => false
402
+ end
403
+
404
+ add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
405
+ add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
406
+
407
+ create_table "email_addresses", :force => true do |t|
408
+ t.string "email_address"
409
+ t.string "description"
410
+ t.datetime "created_at", :null => false
411
+ t.datetime "updated_at", :null => false
412
+ end
413
+
414
+ create_table "file_assets", :force => true do |t|
415
+ t.integer "file_asset_holder_id"
416
+ t.string "file_asset_holder_type"
417
+ t.string "type"
418
+ t.string "name"
419
+ t.string "directory"
420
+ t.string "data_file_name"
421
+ t.string "data_content_type"
422
+ t.integer "data_file_size"
423
+ t.datetime "data_updated_at"
424
+ t.string "width"
425
+ t.string "height"
426
+ t.datetime "created_at", :null => false
427
+ t.datetime "updated_at", :null => false
428
+ end
429
+
430
+ add_index "file_assets", ["directory"], :name => "index_file_assets_on_directory"
431
+ add_index "file_assets", ["file_asset_holder_id", "file_asset_holder_type"], :name => "file_asset_holder_idx"
432
+ add_index "file_assets", ["name"], :name => "index_file_assets_on_name"
433
+ add_index "file_assets", ["type"], :name => "index_file_assets_on_type"
434
+
435
+ create_table "geo_countries", :force => true do |t|
436
+ t.string "name"
437
+ t.string "iso_code_2"
438
+ t.string "iso_code_3"
439
+ t.boolean "display", :default => true
440
+ t.integer "external_id"
441
+ t.datetime "created_at"
442
+ end
443
+
444
+ add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
445
+ add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
446
+
447
+ create_table "geo_zones", :force => true do |t|
448
+ t.integer "geo_country_id"
449
+ t.string "zone_code", :default => "2"
450
+ t.string "zone_name"
451
+ t.datetime "created_at"
452
+ end
453
+
454
+ add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
455
+ add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
456
+ add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
457
+
458
+ create_table "groups", :force => true do |t|
459
+ t.string "description"
460
+ t.datetime "created_at", :null => false
461
+ t.datetime "updated_at", :null => false
462
+ end
463
+
464
+ create_table "individuals", :force => true do |t|
465
+ t.integer "party_id"
466
+ t.string "current_last_name"
467
+ t.string "current_first_name"
468
+ t.string "current_middle_name"
469
+ t.string "current_personal_title"
470
+ t.string "current_suffix"
471
+ t.string "current_nickname"
472
+ t.string "gender", :limit => 1
473
+ t.date "birth_date"
474
+ t.decimal "height", :precision => 5, :scale => 2
475
+ t.integer "weight"
476
+ t.string "mothers_maiden_name"
477
+ t.string "marital_status", :limit => 1
478
+ t.string "social_security_number"
479
+ t.integer "current_passport_number"
480
+ t.date "current_passport_expire_date"
481
+ t.integer "total_years_work_experience"
482
+ t.string "comments"
483
+ t.string "encrypted_ssn"
484
+ t.string "temp_ssn"
485
+ t.string "salt"
486
+ t.string "ssn_last_four"
487
+ t.datetime "created_at", :null => false
488
+ t.datetime "updated_at", :null => false
489
+ end
490
+
491
+ add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
492
+
493
+ create_table "job_trackers", :force => true do |t|
494
+ t.string "job_name"
495
+ t.string "job_klass"
496
+ t.string "run_time"
497
+ t.datetime "last_run_at"
498
+ t.datetime "next_run_at"
499
+ end
500
+
501
+ create_table "money", :force => true do |t|
502
+ t.string "description"
503
+ t.decimal "amount", :precision => 8, :scale => 2
504
+ t.integer "currency_id"
505
+ t.datetime "created_at", :null => false
506
+ t.datetime "updated_at", :null => false
507
+ end
508
+
509
+ add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
510
+
511
+ create_table "note_types", :force => true do |t|
512
+ t.integer "parent_id"
513
+ t.integer "lft"
514
+ t.integer "rgt"
515
+ t.string "description"
516
+ t.string "internal_identifier"
517
+ t.string "external_identifier"
518
+ t.integer "note_type_record_id"
519
+ t.string "note_type_record_type"
520
+ t.datetime "created_at", :null => false
521
+ t.datetime "updated_at", :null => false
522
+ end
523
+
524
+ add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
525
+
526
+ create_table "notes", :force => true do |t|
527
+ t.integer "created_by_id"
528
+ t.text "content"
529
+ t.integer "noted_record_id"
530
+ t.string "noted_record_type"
531
+ t.integer "note_type_id"
532
+ t.datetime "created_at", :null => false
533
+ t.datetime "updated_at", :null => false
534
+ end
535
+
536
+ add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
537
+ add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
538
+ add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
539
+
540
+ create_table "organizations", :force => true do |t|
541
+ t.string "description"
542
+ t.string "tax_id_number"
543
+ t.datetime "created_at", :null => false
544
+ t.datetime "updated_at", :null => false
545
+ end
546
+
547
+ create_table "parties", :force => true do |t|
548
+ t.string "description"
549
+ t.integer "business_party_id"
550
+ t.string "business_party_type"
551
+ t.integer "list_view_image_id"
552
+ t.string "enterprise_identifier"
553
+ t.datetime "created_at", :null => false
554
+ t.datetime "updated_at", :null => false
555
+ end
556
+
557
+ add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
558
+
559
+ create_table "parties_security_roles", :id => false, :force => true do |t|
560
+ t.integer "party_id"
561
+ t.integer "security_role_id"
562
+ end
563
+
564
+ add_index "parties_security_roles", ["party_id"], :name => "index_parties_security_roles_on_party_id"
565
+ add_index "parties_security_roles", ["security_role_id"], :name => "index_parties_security_roles_on_security_role_id"
566
+
567
+ create_table "party_relationships", :force => true do |t|
568
+ t.string "description"
569
+ t.integer "party_id_from"
570
+ t.integer "party_id_to"
571
+ t.integer "role_type_id_from"
572
+ t.integer "role_type_id_to"
573
+ t.integer "status_type_id"
574
+ t.integer "priority_type_id"
575
+ t.integer "relationship_type_id"
576
+ t.date "from_date"
577
+ t.date "thru_date"
578
+ t.string "external_identifier"
579
+ t.string "external_id_source"
580
+ t.datetime "created_at", :null => false
581
+ t.datetime "updated_at", :null => false
582
+ end
583
+
584
+ add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
585
+ add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
586
+ add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
587
+
588
+ create_table "party_roles", :force => true do |t|
589
+ t.string "type"
590
+ t.integer "party_id"
591
+ t.integer "role_type_id"
592
+ t.datetime "created_at", :null => false
593
+ t.datetime "updated_at", :null => false
594
+ end
595
+
596
+ add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
597
+ add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
598
+
599
+ create_table "party_search_facts", :force => true do |t|
600
+ t.integer "party_id"
601
+ t.string "eid"
602
+ t.string "type"
603
+ t.text "roles"
604
+ t.string "party_description"
605
+ t.string "party_business_party_type"
606
+ t.string "user_login"
607
+ t.string "individual_current_last_name"
608
+ t.string "individual_current_first_name"
609
+ t.string "individual_current_middle_name"
610
+ t.string "individual_birth_date"
611
+ t.string "individual_ssn"
612
+ t.string "party_phone_number"
613
+ t.string "party_email_address"
614
+ t.string "party_address_1"
615
+ t.string "party_address_2"
616
+ t.string "party_primary_address_city"
617
+ t.string "party_primary_address_state"
618
+ t.string "party_primary_address_zip"
619
+ t.string "party_primary_address_country"
620
+ t.boolean "user_enabled"
621
+ t.string "user_type"
622
+ t.boolean "reindex"
623
+ t.datetime "created_at", :null => false
624
+ t.datetime "updated_at", :null => false
625
+ end
626
+
627
+ create_table "phone_numbers", :force => true do |t|
628
+ t.string "phone_number"
629
+ t.string "description"
630
+ t.datetime "created_at", :null => false
631
+ t.datetime "updated_at", :null => false
632
+ end
633
+
634
+ create_table "postal_addresses", :force => true do |t|
635
+ t.string "address_line_1"
636
+ t.string "address_line_2"
637
+ t.string "city"
638
+ t.string "state"
639
+ t.string "zip"
640
+ t.string "country"
641
+ t.string "description"
642
+ t.integer "geo_country_id"
643
+ t.integer "geo_zone_id"
644
+ t.datetime "created_at", :null => false
645
+ t.datetime "updated_at", :null => false
646
+ t.decimal "latitude", :precision => 12, :scale => 8
647
+ t.decimal "longitude", :precision => 12, :scale => 8
648
+ end
649
+
650
+ add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
651
+ add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
652
+
653
+ create_table "preference_options", :force => true do |t|
654
+ t.string "description"
655
+ t.string "internal_identifier"
656
+ t.string "value"
657
+ t.datetime "created_at", :null => false
658
+ t.datetime "updated_at", :null => false
659
+ end
660
+
661
+ create_table "preference_options_preference_types", :id => false, :force => true do |t|
662
+ t.integer "preference_type_id"
663
+ t.integer "preference_option_id"
664
+ end
665
+
666
+ add_index "preference_options_preference_types", ["preference_option_id"], :name => "pref_opt_pref_type_pref_opt_id_idx"
667
+ add_index "preference_options_preference_types", ["preference_type_id"], :name => "pref_opt_pref_type_pref_type_id_idx"
668
+
669
+ create_table "preference_types", :force => true do |t|
670
+ t.string "description"
671
+ t.string "internal_identifier"
672
+ t.integer "default_pref_option_id"
673
+ t.datetime "created_at", :null => false
674
+ t.datetime "updated_at", :null => false
675
+ end
676
+
677
+ add_index "preference_types", ["default_pref_option_id"], :name => "index_preference_types_on_default_pref_option_id"
678
+
679
+ create_table "preferences", :force => true do |t|
680
+ t.integer "preference_option_id"
681
+ t.integer "preference_type_id"
682
+ t.datetime "created_at", :null => false
683
+ t.datetime "updated_at", :null => false
684
+ end
685
+
686
+ add_index "preferences", ["preference_option_id"], :name => "index_preferences_on_preference_option_id"
687
+ add_index "preferences", ["preference_type_id"], :name => "index_preferences_on_preference_type_id"
688
+
689
+ create_table "relationship_types", :force => true do |t|
690
+ t.integer "parent_id"
691
+ t.integer "lft"
692
+ t.integer "rgt"
693
+ t.integer "valid_from_role_type_id"
694
+ t.integer "valid_to_role_type_id"
695
+ t.string "name"
696
+ t.string "description"
697
+ t.string "internal_identifier"
698
+ t.string "external_identifier"
699
+ t.string "external_id_source"
700
+ t.datetime "created_at", :null => false
701
+ t.datetime "updated_at", :null => false
702
+ end
703
+
704
+ add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
705
+ add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
706
+
707
+ create_table "role_types", :force => true do |t|
708
+ t.integer "parent_id"
709
+ t.integer "lft"
710
+ t.integer "rgt"
711
+ t.string "description"
712
+ t.string "comments"
713
+ t.string "internal_identifier"
714
+ t.string "external_identifier"
715
+ t.string "external_id_source"
716
+ t.datetime "created_at", :null => false
717
+ t.datetime "updated_at", :null => false
718
+ end
719
+
720
+ create_table "scope_types", :force => true do |t|
721
+ t.string "description"
722
+ t.string "internal_identifier"
723
+ t.datetime "created_at", :null => false
724
+ t.datetime "updated_at", :null => false
725
+ end
726
+
727
+ add_index "scope_types", ["internal_identifier"], :name => "index_scope_types_on_internal_identifier"
728
+
729
+ create_table "security_roles", :force => true do |t|
730
+ t.string "description"
731
+ t.string "internal_identifier"
732
+ t.string "external_identifier"
733
+ t.string "external_id_source"
734
+ t.datetime "created_at", :null => false
735
+ t.datetime "updated_at", :null => false
736
+ end
737
+
738
+ create_table "sessions", :force => true do |t|
739
+ t.string "session_id", :null => false
740
+ t.text "data"
741
+ t.datetime "created_at", :null => false
742
+ t.datetime "updated_at", :null => false
743
+ end
744
+
745
+ add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
746
+ add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
747
+
748
+ create_table "status_applications", :force => true do |t|
749
+ t.integer "tracked_status_type_id"
750
+ t.integer "status_application_record_id"
751
+ t.string "status_application_record_type"
752
+ t.datetime "from_date"
753
+ t.datetime "thru_date"
754
+ t.datetime "created_at", :null => false
755
+ t.datetime "updated_at", :null => false
756
+ end
757
+
758
+ add_index "status_applications", ["from_date"], :name => "from_date_idx"
759
+ add_index "status_applications", ["status_application_record_id", "status_application_record_type"], :name => "status_applications_record_idx"
760
+ add_index "status_applications", ["thru_date"], :name => "thru_date_idx"
761
+ add_index "status_applications", ["tracked_status_type_id"], :name => "tracked_status_type_id_idx"
762
+
763
+ create_table "tracked_status_types", :force => true do |t|
764
+ t.string "description"
765
+ t.string "internal_identifier"
766
+ t.string "external_identifier"
767
+ t.datetime "created_at", :null => false
768
+ t.datetime "updated_at", :null => false
769
+ end
770
+
771
+ add_index "tracked_status_types", ["internal_identifier"], :name => "tracked_status_types_iid_idx"
772
+
773
+ create_table "tree_menu_node_defs", :force => true do |t|
774
+ t.string "node_type"
775
+ t.integer "parent_id"
776
+ t.integer "lft"
777
+ t.integer "rgt"
778
+ t.string "menu_short_name"
779
+ t.string "menu_description"
780
+ t.string "text"
781
+ t.string "icon_url"
782
+ t.string "target_url"
783
+ t.string "resource_class"
784
+ t.datetime "created_at", :null => false
785
+ t.datetime "updated_at", :null => false
786
+ end
787
+
788
+ add_index "tree_menu_node_defs", ["parent_id"], :name => "index_tree_menu_node_defs_on_parent_id"
789
+
790
+ create_table "user_preferences", :force => true do |t|
791
+ t.integer "user_id"
792
+ t.integer "preference_id"
793
+ t.integer "preferenced_record_id"
794
+ t.string "preferenced_record_type"
795
+ t.datetime "created_at", :null => false
796
+ t.datetime "updated_at", :null => false
797
+ end
798
+
799
+ add_index "user_preferences", ["preference_id"], :name => "index_user_preferences_on_preference_id"
800
+ add_index "user_preferences", ["preferenced_record_id"], :name => "index_user_preferences_on_preferenced_record_id"
801
+ add_index "user_preferences", ["preferenced_record_type"], :name => "index_user_preferences_on_preferenced_record_type"
802
+ add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
803
+
804
+ create_table "users", :force => true do |t|
805
+ t.string "username"
806
+ t.string "email"
807
+ t.integer "party_id"
808
+ t.string "type"
809
+ t.string "salt"
810
+ t.string "crypted_password"
811
+ t.datetime "last_login_at"
812
+ t.datetime "last_logout_at"
813
+ t.datetime "last_activity_at"
814
+ t.integer "failed_logins_count", :default => 0
815
+ t.datetime "lock_expires_at"
816
+ t.string "remember_me_token"
817
+ t.datetime "remember_me_token_expires_at"
818
+ t.string "reset_password_token"
819
+ t.datetime "reset_password_token_expires_at"
820
+ t.datetime "reset_password_email_sent_at"
821
+ t.string "activation_state"
822
+ t.string "activation_token"
823
+ t.datetime "activation_token_expires_at"
824
+ t.string "security_question_1"
825
+ t.string "security_answer_1"
826
+ t.string "security_question_2"
827
+ t.string "security_answer_2"
828
+ t.datetime "created_at", :null => false
829
+ t.datetime "updated_at", :null => false
830
+ end
831
+
832
+ add_index "users", ["activation_token"], :name => "index_users_on_activation_token"
833
+ add_index "users", ["email"], :name => "index_users_on_email", :unique => true
834
+ add_index "users", ["last_logout_at", "last_activity_at"], :name => "activity_idx"
835
+ add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token"
836
+ add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token"
837
+ add_index "users", ["username"], :name => "index_users_on_username", :unique => true
838
+
839
+ create_table "valid_configurations", :force => true do |t|
840
+ t.integer "configured_item_id"
841
+ t.string "configured_item_type"
842
+ t.integer "configuration_id"
843
+ t.datetime "created_at", :null => false
844
+ t.datetime "updated_at", :null => false
845
+ end
846
+
847
+ add_index "valid_configurations", ["configuration_id"], :name => "index_valid_configurations_on_configuration_id"
848
+ add_index "valid_configurations", ["configured_item_id", "configured_item_type"], :name => "configured_item_poly_idx"
849
+
850
+ create_table "valid_note_types", :force => true do |t|
851
+ t.integer "valid_note_type_record_id"
852
+ t.string "valid_note_type_record_type"
853
+ t.integer "note_type_id"
854
+ t.datetime "created_at", :null => false
855
+ t.datetime "updated_at", :null => false
856
+ end
857
+
858
+ add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
859
+ add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
860
+
861
+ create_table "valid_preference_types", :force => true do |t|
862
+ t.integer "preference_type_id"
863
+ t.integer "preferenced_record_id"
864
+ t.string "preferenced_record_type"
865
+ end
866
+
867
+ create_table "view_types", :force => true do |t|
868
+ t.string "internal_identifier"
869
+ t.string "description"
870
+ t.datetime "created_at", :null => false
871
+ t.datetime "updated_at", :null => false
872
+ end
873
+
874
+ create_table "widgets", :force => true do |t|
875
+ t.string "description"
876
+ t.string "internal_identifier"
877
+ t.string "icon"
878
+ t.string "xtype"
879
+ t.datetime "created_at", :null => false
880
+ t.datetime "updated_at", :null => false
881
+ end
882
+
883
+ end