erp_forms 3.0.2 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/app/models/dynamic_form_document.rb +1 -0
  2. data/app/widgets/dynamic_grid/base.rb +26 -0
  3. data/app/widgets/dynamic_grid/helpers/controller/dynamic_grid_controller_helper.rb +3 -0
  4. data/app/widgets/dynamic_grid/helpers/view/dynamic_grid_view_helper.rb +3 -0
  5. data/app/widgets/dynamic_grid/javascript/dynamic_grid.js +12 -0
  6. data/app/widgets/dynamic_grid/views/index.html.erb +1 -0
  7. data/lib/erp_forms/dynamic_grid_column.rb +1 -1
  8. data/lib/erp_forms/version.rb +2 -2
  9. data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +15 -0
  10. data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +12 -0
  11. data/spec/dummy/db/data_migrations/20110608185830_create_default_dynamic_models_and_forms.erp_forms.rb +33 -0
  12. data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +19 -0
  13. data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +252 -0
  14. data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +53 -0
  15. data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +16 -0
  16. data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +21 -0
  17. data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +32 -0
  18. data/spec/dummy/db/data_migrations/20110828190913_create_desktop_app_dynamic_forms.erp_forms.rb +19 -0
  19. data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +12 -0
  20. data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +23 -0
  21. data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +42 -0
  22. data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +22 -0
  23. data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +29 -0
  24. data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +11 -0
  25. data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +19 -0
  26. data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +23 -0
  27. data/spec/dummy/db/data_migrations/20120824013449_create_ticket_form.erp_forms.rb +67 -0
  28. data/spec/dummy/db/data_migrations/20121026013449_update_ticket_form.erp_forms.rb +65 -0
  29. data/spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb +27 -0
  30. data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +20 -0
  31. data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +16 -0
  32. data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +24 -0
  33. data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +23 -0
  34. data/spec/dummy/db/migrate/20130105143900_base_erp_services.erp_base_erp_svcs.rb +461 -0
  35. data/spec/dummy/db/migrate/20130105143901_base_tech_services.erp_tech_svcs.rb +271 -0
  36. data/spec/dummy/db/migrate/20130105143902_create_has_attribute_tables.erp_tech_svcs.rb +39 -0
  37. data/spec/dummy/db/migrate/20130105143903_create_groups.erp_tech_svcs.rb +19 -0
  38. data/spec/dummy/db/migrate/20130105143904_upgrade_security.erp_tech_svcs.rb +54 -0
  39. data/spec/dummy/db/migrate/20130105143905_upgrade_security2.erp_tech_svcs.rb +270 -0
  40. data/spec/dummy/db/migrate/20130105143906_base_app_framework.erp_app.rb +276 -0
  41. data/spec/dummy/db/migrate/20130105143907_dynamic_forms.erp_forms.rb +95 -0
  42. data/spec/dummy/db/migrate/20130105143908_create_tickets.erp_forms.rb +19 -0
  43. data/spec/dummy/db/migrate/20130105143909_upgrade_dynamic_forms_table.erp_forms.rb +32 -0
  44. data/spec/dummy/db/schema.rb +894 -0
  45. data/spec/dummy/db/spec.sqlite3 +0 -0
  46. data/spec/dummy/log/spec.log +3477 -0
  47. metadata +84 -4
  48. data/public/javascripts/erp_app/shared/dynamic_forms/dynamic_form_fields.js +0 -99
@@ -0,0 +1,894 @@
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 => 20130105143909) 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 "base_url"
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_instances", :force => true do |t|
202
+ t.decimal "version", :precision => 8, :scale => 3
203
+ t.datetime "created_at", :null => false
204
+ t.datetime "updated_at", :null => false
205
+ end
206
+
207
+ create_table "configuration_item_types", :force => true do |t|
208
+ t.integer "parent_id"
209
+ t.integer "lft"
210
+ t.integer "rgt"
211
+ t.string "description"
212
+ t.string "internal_identifier"
213
+ t.boolean "allow_user_defined_options", :default => false
214
+ t.boolean "is_multi_optional", :default => false
215
+ t.datetime "created_at", :null => false
216
+ t.datetime "updated_at", :null => false
217
+ end
218
+
219
+ create_table "configuration_item_types_configuration_options", :force => true do |t|
220
+ t.integer "configuration_item_type_id"
221
+ t.integer "configuration_option_id"
222
+ t.boolean "is_default", :default => false
223
+ t.datetime "created_at", :null => false
224
+ t.datetime "updated_at", :null => false
225
+ end
226
+
227
+ add_index "configuration_item_types_configuration_options", ["configuration_item_type_id"], :name => "conf_item_type_conf_opt_id_item_idx"
228
+ add_index "configuration_item_types_configuration_options", ["configuration_option_id"], :name => "conf_item_type_conf_opt_id_opt_idx"
229
+
230
+ create_table "configuration_item_types_configurations", :id => false, :force => true do |t|
231
+ t.integer "configuration_item_type_id"
232
+ t.integer "configuration_id"
233
+ end
234
+
235
+ add_index "configuration_item_types_configurations", ["configuration_id"], :name => "conf_id_idx"
236
+ add_index "configuration_item_types_configurations", ["configuration_item_type_id", "configuration_id"], :name => "conf_config_type_uniq_idx", :unique => true
237
+ add_index "configuration_item_types_configurations", ["configuration_item_type_id"], :name => "conf_conf_type_id_item_idx"
238
+
239
+ create_table "configuration_items", :force => true do |t|
240
+ t.integer "configuration_id"
241
+ t.integer "configuration_item_type_id"
242
+ t.integer "configuration_option_id"
243
+ t.datetime "created_at", :null => false
244
+ t.datetime "updated_at", :null => false
245
+ end
246
+
247
+ add_index "configuration_items", ["configuration_id"], :name => "index_configuration_items_on_configuration_id"
248
+ add_index "configuration_items", ["configuration_item_type_id"], :name => "index_configuration_items_on_configuration_item_type_id"
249
+ add_index "configuration_items", ["configuration_option_id"], :name => "index_configuration_items_on_configuration_option_id"
250
+
251
+ create_table "configuration_items_configuration_options", :id => false, :force => true do |t|
252
+ t.integer "configuration_item_id"
253
+ t.integer "configuration_option_id"
254
+ end
255
+
256
+ add_index "configuration_items_configuration_options", ["configuration_item_id"], :name => "conf_item_conf_opt_id_item_idx"
257
+ add_index "configuration_items_configuration_options", ["configuration_option_id"], :name => "conf_item_conf_opt_id_opt_idx"
258
+
259
+ create_table "configuration_options", :force => true do |t|
260
+ t.string "description"
261
+ t.string "internal_identifier"
262
+ t.string "value"
263
+ t.text "comment"
264
+ t.boolean "user_defined", :default => false
265
+ t.datetime "created_at", :null => false
266
+ t.datetime "updated_at", :null => false
267
+ end
268
+
269
+ add_index "configuration_options", ["internal_identifier"], :name => "index_configuration_options_on_internal_identifier"
270
+ add_index "configuration_options", ["user_defined"], :name => "index_configuration_options_on_user_defined"
271
+ add_index "configuration_options", ["value"], :name => "index_configuration_options_on_value"
272
+
273
+ create_table "configurations", :force => true do |t|
274
+ t.string "description"
275
+ t.string "internal_identifier"
276
+ t.boolean "active"
277
+ t.boolean "is_template", :default => false
278
+ t.datetime "created_at", :null => false
279
+ t.datetime "updated_at", :null => false
280
+ end
281
+
282
+ add_index "configurations", ["is_template"], :name => "index_configurations_on_is_template"
283
+
284
+ create_table "contact_purposes", :force => true do |t|
285
+ t.integer "parent_id"
286
+ t.integer "lft"
287
+ t.integer "rgt"
288
+ t.string "description"
289
+ t.string "comments"
290
+ t.string "internal_identifier"
291
+ t.string "external_identifier"
292
+ t.string "external_id_source"
293
+ t.datetime "created_at", :null => false
294
+ t.datetime "updated_at", :null => false
295
+ end
296
+
297
+ add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
298
+
299
+ create_table "contact_purposes_contacts", :id => false, :force => true do |t|
300
+ t.integer "contact_id"
301
+ t.integer "contact_purpose_id"
302
+ end
303
+
304
+ add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
305
+
306
+ create_table "contact_types", :force => true do |t|
307
+ t.integer "parent_id"
308
+ t.integer "lft"
309
+ t.integer "rgt"
310
+ t.string "description"
311
+ t.string "comments"
312
+ t.string "internal_identifier"
313
+ t.string "external_identifier"
314
+ t.string "external_id_source"
315
+ t.datetime "created_at", :null => false
316
+ t.datetime "updated_at", :null => false
317
+ end
318
+
319
+ add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
320
+
321
+ create_table "contacts", :force => true do |t|
322
+ t.integer "party_id"
323
+ t.integer "contact_mechanism_id"
324
+ t.string "contact_mechanism_type"
325
+ t.string "external_identifier"
326
+ t.string "external_id_source"
327
+ t.datetime "created_at", :null => false
328
+ t.datetime "updated_at", :null => false
329
+ end
330
+
331
+ add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
332
+ add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
333
+
334
+ create_table "currencies", :force => true do |t|
335
+ t.string "name"
336
+ t.string "definition"
337
+ t.string "internal_identifier"
338
+ t.string "numeric_code"
339
+ t.string "major_unit_symbol"
340
+ t.string "minor_unit_symbol"
341
+ t.string "ratio_of_minor_unit_to_major_unit"
342
+ t.string "postfix_label"
343
+ t.datetime "introduction_date"
344
+ t.datetime "expiration_date"
345
+ t.datetime "created_at", :null => false
346
+ t.datetime "updated_at", :null => false
347
+ end
348
+
349
+ add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
350
+
351
+ create_table "delayed_jobs", :force => true do |t|
352
+ t.integer "priority", :default => 0
353
+ t.integer "attempts", :default => 0
354
+ t.text "handler"
355
+ t.text "last_error"
356
+ t.datetime "run_at"
357
+ t.datetime "locked_at"
358
+ t.datetime "failed_at"
359
+ t.string "locked_by"
360
+ t.string "queue"
361
+ t.datetime "created_at", :null => false
362
+ t.datetime "updated_at", :null => false
363
+ end
364
+
365
+ add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
366
+
367
+ create_table "descriptive_assets", :force => true do |t|
368
+ t.integer "view_type_id"
369
+ t.string "internal_identifier"
370
+ t.text "description"
371
+ t.string "external_identifier"
372
+ t.string "external_id_source"
373
+ t.integer "described_record_id"
374
+ t.string "described_record_type"
375
+ t.datetime "created_at", :null => false
376
+ t.datetime "updated_at", :null => false
377
+ end
378
+
379
+ add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
380
+ add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
381
+
382
+ create_table "dynamic_data", :force => true do |t|
383
+ t.string "reference_type"
384
+ t.integer "reference_id"
385
+ t.text "dynamic_attributes"
386
+ t.integer "created_with_form_id"
387
+ t.integer "updated_with_form_id"
388
+ t.integer "created_by_id"
389
+ t.integer "updated_by_id"
390
+ t.datetime "created_at", :null => false
391
+ t.datetime "updated_at", :null => false
392
+ end
393
+
394
+ add_index "dynamic_data", ["created_by_id"], :name => "index_dynamic_data_on_created_by_id"
395
+ add_index "dynamic_data", ["created_with_form_id"], :name => "index_dynamic_data_on_created_with_form_id"
396
+ add_index "dynamic_data", ["reference_id"], :name => "index_dynamic_data_on_reference_id"
397
+ add_index "dynamic_data", ["reference_type"], :name => "index_dynamic_data_on_reference_type"
398
+ add_index "dynamic_data", ["updated_by_id"], :name => "index_dynamic_data_on_updated_by_id"
399
+ add_index "dynamic_data", ["updated_with_form_id"], :name => "index_dynamic_data_on_updated_with_form_id"
400
+
401
+ create_table "dynamic_form_documents", :force => true do |t|
402
+ t.integer "dynamic_form_model_id"
403
+ t.string "type"
404
+ t.datetime "created_at", :null => false
405
+ t.datetime "updated_at", :null => false
406
+ end
407
+
408
+ add_index "dynamic_form_documents", ["dynamic_form_model_id"], :name => "index_dynamic_form_documents_on_dynamic_form_model_id"
409
+ add_index "dynamic_form_documents", ["type"], :name => "index_dynamic_form_documents_on_type"
410
+
411
+ create_table "dynamic_form_models", :force => true do |t|
412
+ t.string "model_name"
413
+ t.boolean "show_in_multitask", :default => false
414
+ t.boolean "allow_comments", :default => true
415
+ t.boolean "allow_files", :default => true
416
+ t.string "file_security_default", :default => "private"
417
+ t.datetime "created_at", :null => false
418
+ t.datetime "updated_at", :null => false
419
+ end
420
+
421
+ create_table "dynamic_forms", :force => true do |t|
422
+ t.string "description"
423
+ t.text "definition"
424
+ t.integer "dynamic_form_model_id"
425
+ t.string "model_name"
426
+ t.string "internal_identifier"
427
+ t.boolean "default"
428
+ t.string "widget_action", :default => "save"
429
+ t.string "widget_email_recipients"
430
+ t.boolean "focus_first_field", :default => true
431
+ t.boolean "submit_empty_text", :default => false
432
+ t.string "msg_target", :default => "qtip"
433
+ t.string "submit_button_label", :default => "Submit"
434
+ t.string "cancel_button_label", :default => "Cancel"
435
+ t.text "comment"
436
+ t.integer "created_by_id"
437
+ t.integer "updated_by_id"
438
+ t.datetime "created_at", :null => false
439
+ t.datetime "updated_at", :null => false
440
+ end
441
+
442
+ add_index "dynamic_forms", ["created_by_id"], :name => "index_dynamic_forms_on_created_by_id"
443
+ add_index "dynamic_forms", ["dynamic_form_model_id"], :name => "index_dynamic_forms_on_dynamic_form_model_id"
444
+ add_index "dynamic_forms", ["internal_identifier"], :name => "index_dynamic_forms_on_internal_identifier"
445
+ add_index "dynamic_forms", ["model_name"], :name => "index_dynamic_forms_on_model_name"
446
+ add_index "dynamic_forms", ["updated_by_id"], :name => "index_dynamic_forms_on_updated_by_id"
447
+
448
+ create_table "email_addresses", :force => true do |t|
449
+ t.string "email_address"
450
+ t.string "description"
451
+ t.datetime "created_at", :null => false
452
+ t.datetime "updated_at", :null => false
453
+ end
454
+
455
+ create_table "file_assets", :force => true do |t|
456
+ t.integer "file_asset_holder_id"
457
+ t.string "file_asset_holder_type"
458
+ t.string "type"
459
+ t.string "name"
460
+ t.string "directory"
461
+ t.string "data_file_name"
462
+ t.string "data_content_type"
463
+ t.integer "data_file_size"
464
+ t.datetime "data_updated_at"
465
+ t.string "width"
466
+ t.string "height"
467
+ t.datetime "created_at", :null => false
468
+ t.datetime "updated_at", :null => false
469
+ end
470
+
471
+ add_index "file_assets", ["directory"], :name => "index_file_assets_on_directory"
472
+ add_index "file_assets", ["file_asset_holder_id", "file_asset_holder_type"], :name => "file_asset_holder_idx"
473
+ add_index "file_assets", ["name"], :name => "index_file_assets_on_name"
474
+ add_index "file_assets", ["type"], :name => "index_file_assets_on_type"
475
+
476
+ create_table "geo_countries", :force => true do |t|
477
+ t.string "name"
478
+ t.string "iso_code_2"
479
+ t.string "iso_code_3"
480
+ t.boolean "display", :default => true
481
+ t.integer "external_id"
482
+ t.datetime "created_at"
483
+ end
484
+
485
+ add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
486
+ add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
487
+
488
+ create_table "geo_zones", :force => true do |t|
489
+ t.integer "geo_country_id"
490
+ t.string "zone_code", :default => "2"
491
+ t.string "zone_name"
492
+ t.datetime "created_at"
493
+ end
494
+
495
+ add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
496
+ add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
497
+ add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
498
+
499
+ create_table "groups", :force => true do |t|
500
+ t.string "description"
501
+ t.datetime "created_at", :null => false
502
+ t.datetime "updated_at", :null => false
503
+ end
504
+
505
+ create_table "individuals", :force => true do |t|
506
+ t.integer "party_id"
507
+ t.string "current_last_name"
508
+ t.string "current_first_name"
509
+ t.string "current_middle_name"
510
+ t.string "current_personal_title"
511
+ t.string "current_suffix"
512
+ t.string "current_nickname"
513
+ t.string "gender", :limit => 1
514
+ t.date "birth_date"
515
+ t.decimal "height", :precision => 5, :scale => 2
516
+ t.integer "weight"
517
+ t.string "mothers_maiden_name"
518
+ t.string "marital_status", :limit => 1
519
+ t.string "social_security_number"
520
+ t.integer "current_passport_number"
521
+ t.date "current_passport_expire_date"
522
+ t.integer "total_years_work_experience"
523
+ t.string "comments"
524
+ t.string "encrypted_ssn"
525
+ t.string "temp_ssn"
526
+ t.string "salt"
527
+ t.string "ssn_last_four"
528
+ t.datetime "created_at", :null => false
529
+ t.datetime "updated_at", :null => false
530
+ end
531
+
532
+ add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
533
+
534
+ create_table "money", :force => true do |t|
535
+ t.string "description"
536
+ t.decimal "amount", :precision => 8, :scale => 2
537
+ t.integer "currency_id"
538
+ t.datetime "created_at", :null => false
539
+ t.datetime "updated_at", :null => false
540
+ end
541
+
542
+ add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
543
+
544
+ create_table "note_types", :force => true do |t|
545
+ t.integer "parent_id"
546
+ t.integer "lft"
547
+ t.integer "rgt"
548
+ t.string "description"
549
+ t.string "internal_identifier"
550
+ t.string "external_identifier"
551
+ t.integer "note_type_record_id"
552
+ t.string "note_type_record_type"
553
+ t.datetime "created_at", :null => false
554
+ t.datetime "updated_at", :null => false
555
+ end
556
+
557
+ add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
558
+
559
+ create_table "notes", :force => true do |t|
560
+ t.integer "created_by_id"
561
+ t.text "content"
562
+ t.integer "noted_record_id"
563
+ t.string "noted_record_type"
564
+ t.integer "note_type_id"
565
+ t.datetime "created_at", :null => false
566
+ t.datetime "updated_at", :null => false
567
+ end
568
+
569
+ add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
570
+ add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
571
+ add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
572
+
573
+ create_table "organizations", :force => true do |t|
574
+ t.string "description"
575
+ t.string "tax_id_number"
576
+ t.datetime "created_at", :null => false
577
+ t.datetime "updated_at", :null => false
578
+ end
579
+
580
+ create_table "parties", :force => true do |t|
581
+ t.string "description"
582
+ t.integer "business_party_id"
583
+ t.string "business_party_type"
584
+ t.integer "list_view_image_id"
585
+ t.string "enterprise_identifier"
586
+ t.datetime "created_at", :null => false
587
+ t.datetime "updated_at", :null => false
588
+ end
589
+
590
+ add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
591
+
592
+ create_table "parties_security_roles", :id => false, :force => true do |t|
593
+ t.integer "party_id"
594
+ t.integer "security_role_id"
595
+ end
596
+
597
+ add_index "parties_security_roles", ["party_id"], :name => "index_parties_security_roles_on_party_id"
598
+ add_index "parties_security_roles", ["security_role_id"], :name => "index_parties_security_roles_on_security_role_id"
599
+
600
+ create_table "party_relationships", :force => true do |t|
601
+ t.string "description"
602
+ t.integer "party_id_from"
603
+ t.integer "party_id_to"
604
+ t.integer "role_type_id_from"
605
+ t.integer "role_type_id_to"
606
+ t.integer "status_type_id"
607
+ t.integer "priority_type_id"
608
+ t.integer "relationship_type_id"
609
+ t.date "from_date"
610
+ t.date "thru_date"
611
+ t.string "external_identifier"
612
+ t.string "external_id_source"
613
+ t.datetime "created_at", :null => false
614
+ t.datetime "updated_at", :null => false
615
+ end
616
+
617
+ add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
618
+ add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
619
+ add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
620
+
621
+ create_table "party_roles", :force => true do |t|
622
+ t.string "type"
623
+ t.integer "party_id"
624
+ t.integer "role_type_id"
625
+ t.datetime "created_at", :null => false
626
+ t.datetime "updated_at", :null => false
627
+ end
628
+
629
+ add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
630
+ add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
631
+
632
+ create_table "party_search_facts", :force => true do |t|
633
+ t.integer "party_id"
634
+ t.string "eid"
635
+ t.string "type"
636
+ t.text "roles"
637
+ t.string "party_description"
638
+ t.string "party_business_party_type"
639
+ t.string "user_login"
640
+ t.string "individual_current_last_name"
641
+ t.string "individual_current_first_name"
642
+ t.string "individual_current_middle_name"
643
+ t.string "individual_birth_date"
644
+ t.string "individual_ssn"
645
+ t.string "party_phone_number"
646
+ t.string "party_email_address"
647
+ t.string "party_address_1"
648
+ t.string "party_address_2"
649
+ t.string "party_primary_address_city"
650
+ t.string "party_primary_address_state"
651
+ t.string "party_primary_address_zip"
652
+ t.string "party_primary_address_country"
653
+ t.boolean "user_enabled"
654
+ t.string "user_type"
655
+ t.boolean "reindex"
656
+ t.datetime "created_at", :null => false
657
+ t.datetime "updated_at", :null => false
658
+ end
659
+
660
+ create_table "phone_numbers", :force => true do |t|
661
+ t.string "phone_number"
662
+ t.string "description"
663
+ t.datetime "created_at", :null => false
664
+ t.datetime "updated_at", :null => false
665
+ end
666
+
667
+ create_table "postal_addresses", :force => true do |t|
668
+ t.string "address_line_1"
669
+ t.string "address_line_2"
670
+ t.string "city"
671
+ t.string "state"
672
+ t.string "zip"
673
+ t.string "country"
674
+ t.string "description"
675
+ t.integer "geo_country_id"
676
+ t.integer "geo_zone_id"
677
+ t.datetime "created_at", :null => false
678
+ t.datetime "updated_at", :null => false
679
+ end
680
+
681
+ add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
682
+ add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
683
+
684
+ create_table "preference_options", :force => true do |t|
685
+ t.string "description"
686
+ t.string "internal_identifier"
687
+ t.string "value"
688
+ t.datetime "created_at", :null => false
689
+ t.datetime "updated_at", :null => false
690
+ end
691
+
692
+ create_table "preference_options_preference_types", :id => false, :force => true do |t|
693
+ t.integer "preference_type_id"
694
+ t.integer "preference_option_id"
695
+ end
696
+
697
+ add_index "preference_options_preference_types", ["preference_option_id"], :name => "pref_opt_pref_type_pref_opt_id_idx"
698
+ add_index "preference_options_preference_types", ["preference_type_id"], :name => "pref_opt_pref_type_pref_type_id_idx"
699
+
700
+ create_table "preference_types", :force => true do |t|
701
+ t.string "description"
702
+ t.string "internal_identifier"
703
+ t.integer "default_pref_option_id"
704
+ t.datetime "created_at", :null => false
705
+ t.datetime "updated_at", :null => false
706
+ end
707
+
708
+ add_index "preference_types", ["default_pref_option_id"], :name => "index_preference_types_on_default_pref_option_id"
709
+
710
+ create_table "preferences", :force => true do |t|
711
+ t.integer "preference_option_id"
712
+ t.integer "preference_type_id"
713
+ t.datetime "created_at", :null => false
714
+ t.datetime "updated_at", :null => false
715
+ end
716
+
717
+ add_index "preferences", ["preference_option_id"], :name => "index_preferences_on_preference_option_id"
718
+ add_index "preferences", ["preference_type_id"], :name => "index_preferences_on_preference_type_id"
719
+
720
+ create_table "relationship_types", :force => true do |t|
721
+ t.integer "parent_id"
722
+ t.integer "lft"
723
+ t.integer "rgt"
724
+ t.integer "valid_from_role_type_id"
725
+ t.integer "valid_to_role_type_id"
726
+ t.string "name"
727
+ t.string "description"
728
+ t.string "internal_identifier"
729
+ t.string "external_identifier"
730
+ t.string "external_id_source"
731
+ t.datetime "created_at", :null => false
732
+ t.datetime "updated_at", :null => false
733
+ end
734
+
735
+ add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
736
+ add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
737
+
738
+ create_table "role_types", :force => true do |t|
739
+ t.integer "parent_id"
740
+ t.integer "lft"
741
+ t.integer "rgt"
742
+ t.string "description"
743
+ t.string "comments"
744
+ t.string "internal_identifier"
745
+ t.string "external_identifier"
746
+ t.string "external_id_source"
747
+ t.datetime "created_at", :null => false
748
+ t.datetime "updated_at", :null => false
749
+ end
750
+
751
+ create_table "scope_types", :force => true do |t|
752
+ t.string "description"
753
+ t.string "internal_identifier"
754
+ t.datetime "created_at", :null => false
755
+ t.datetime "updated_at", :null => false
756
+ end
757
+
758
+ add_index "scope_types", ["internal_identifier"], :name => "index_scope_types_on_internal_identifier"
759
+
760
+ create_table "security_roles", :force => true do |t|
761
+ t.string "description"
762
+ t.string "internal_identifier"
763
+ t.string "external_identifier"
764
+ t.string "external_id_source"
765
+ t.datetime "created_at", :null => false
766
+ t.datetime "updated_at", :null => false
767
+ end
768
+
769
+ create_table "sessions", :force => true do |t|
770
+ t.string "session_id", :null => false
771
+ t.text "data"
772
+ t.datetime "created_at", :null => false
773
+ t.datetime "updated_at", :null => false
774
+ end
775
+
776
+ add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
777
+ add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
778
+
779
+ create_table "tickets", :force => true do |t|
780
+ t.datetime "created_at", :null => false
781
+ t.datetime "updated_at", :null => false
782
+ end
783
+
784
+ create_table "tree_menu_node_defs", :force => true do |t|
785
+ t.string "node_type"
786
+ t.integer "parent_id"
787
+ t.integer "lft"
788
+ t.integer "rgt"
789
+ t.string "menu_short_name"
790
+ t.string "menu_description"
791
+ t.string "text"
792
+ t.string "icon_url"
793
+ t.string "target_url"
794
+ t.string "resource_class"
795
+ t.datetime "created_at", :null => false
796
+ t.datetime "updated_at", :null => false
797
+ end
798
+
799
+ add_index "tree_menu_node_defs", ["parent_id"], :name => "index_tree_menu_node_defs_on_parent_id"
800
+
801
+ create_table "user_preferences", :force => true do |t|
802
+ t.integer "user_id"
803
+ t.integer "preference_id"
804
+ t.integer "preferenced_record_id"
805
+ t.string "preferenced_record_type"
806
+ t.datetime "created_at", :null => false
807
+ t.datetime "updated_at", :null => false
808
+ end
809
+
810
+ add_index "user_preferences", ["preference_id"], :name => "index_user_preferences_on_preference_id"
811
+ add_index "user_preferences", ["preferenced_record_id"], :name => "index_user_preferences_on_preferenced_record_id"
812
+ add_index "user_preferences", ["preferenced_record_type"], :name => "index_user_preferences_on_preferenced_record_type"
813
+ add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
814
+
815
+ create_table "users", :force => true do |t|
816
+ t.string "username"
817
+ t.string "email"
818
+ t.integer "party_id"
819
+ t.string "type"
820
+ t.string "salt"
821
+ t.string "crypted_password"
822
+ t.datetime "last_login_at"
823
+ t.datetime "last_logout_at"
824
+ t.datetime "last_activity_at"
825
+ t.integer "failed_logins_count", :default => 0
826
+ t.datetime "lock_expires_at"
827
+ t.string "remember_me_token"
828
+ t.datetime "remember_me_token_expires_at"
829
+ t.string "reset_password_token"
830
+ t.datetime "reset_password_token_expires_at"
831
+ t.datetime "reset_password_email_sent_at"
832
+ t.string "activation_state"
833
+ t.string "activation_token"
834
+ t.datetime "activation_token_expires_at"
835
+ t.string "security_question_1"
836
+ t.string "security_answer_1"
837
+ t.string "security_question_2"
838
+ t.string "security_answer_2"
839
+ t.datetime "created_at", :null => false
840
+ t.datetime "updated_at", :null => false
841
+ end
842
+
843
+ add_index "users", ["activation_token"], :name => "index_users_on_activation_token"
844
+ add_index "users", ["email"], :name => "index_users_on_email", :unique => true
845
+ add_index "users", ["last_logout_at", "last_activity_at"], :name => "activity_idx"
846
+ add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token"
847
+ add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token"
848
+ add_index "users", ["username"], :name => "index_users_on_username", :unique => true
849
+
850
+ create_table "valid_configurations", :force => true do |t|
851
+ t.integer "configured_item_id"
852
+ t.string "configured_item_type"
853
+ t.integer "configuration_id"
854
+ t.datetime "created_at", :null => false
855
+ t.datetime "updated_at", :null => false
856
+ end
857
+
858
+ add_index "valid_configurations", ["configuration_id"], :name => "index_valid_configurations_on_configuration_id"
859
+ add_index "valid_configurations", ["configured_item_id", "configured_item_type"], :name => "configured_item_poly_idx"
860
+
861
+ create_table "valid_note_types", :force => true do |t|
862
+ t.integer "valid_note_type_record_id"
863
+ t.string "valid_note_type_record_type"
864
+ t.integer "note_type_id"
865
+ t.datetime "created_at", :null => false
866
+ t.datetime "updated_at", :null => false
867
+ end
868
+
869
+ add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
870
+ add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
871
+
872
+ create_table "valid_preference_types", :force => true do |t|
873
+ t.integer "preference_type_id"
874
+ t.integer "preferenced_record_id"
875
+ t.string "preferenced_record_type"
876
+ end
877
+
878
+ create_table "view_types", :force => true do |t|
879
+ t.string "internal_identifier"
880
+ t.string "description"
881
+ t.datetime "created_at", :null => false
882
+ t.datetime "updated_at", :null => false
883
+ end
884
+
885
+ create_table "widgets", :force => true do |t|
886
+ t.string "description"
887
+ t.string "internal_identifier"
888
+ t.string "icon"
889
+ t.string "xtype"
890
+ t.datetime "created_at", :null => false
891
+ t.datetime "updated_at", :null => false
892
+ end
893
+
894
+ end