erp_financial_accounting 3.0.4 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/app/models/gl_account.rb +2 -0
  2. data/app/models/price_plan_comp_gl_account.rb +2 -0
  3. data/lib/erp_financial_accounting/version.rb +2 -2
  4. data/lib/erp_financial_accounting.rb +2 -0
  5. data/spec/dummy/config/application.rb +6 -0
  6. data/spec/dummy/config/environments/spec.rb +3 -0
  7. data/spec/dummy/db/data_migrations/20101011152441_payment_gateway_actions.erp_commerce.rb +28 -0
  8. data/spec/dummy/db/data_migrations/20101014142230_financial_txn_types.erp_txns_and_accts.rb +16 -0
  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/20110324010232_product_role_types.erp_products.rb +24 -0
  11. data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +12 -0
  12. data/spec/dummy/db/data_migrations/20110527160807_add_default_prod_avail_types.erp_products.rb +27 -0
  13. data/spec/dummy/db/data_migrations/20110605231556_create_order_party_roles.erp_orders.rb +24 -0
  14. data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +19 -0
  15. data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +252 -0
  16. data/spec/dummy/db/data_migrations/20110728201730_create_desktop_app_product_manager.erp_products.rb +26 -0
  17. data/spec/dummy/db/data_migrations/20110728201731_create_desktop_app_order_manager.erp_orders.rb +26 -0
  18. data/spec/dummy/db/data_migrations/20110728201732_create_organizer_app_order_management.erp_orders.rb +15 -0
  19. data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +53 -0
  20. data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +16 -0
  21. data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +21 -0
  22. data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +32 -0
  23. data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +12 -0
  24. data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +23 -0
  25. data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +42 -0
  26. data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +22 -0
  27. data/spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb +14 -0
  28. data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +29 -0
  29. data/spec/dummy/db/data_migrations/20120229174343_add_orders_widget.erp_orders.rb +29 -0
  30. data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +11 -0
  31. data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +19 -0
  32. data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +23 -0
  33. data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +20 -0
  34. data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +16 -0
  35. data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +24 -0
  36. data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +23 -0
  37. data/spec/dummy/db/migrate/20121213234212_base_erp_services.erp_base_erp_svcs.rb +461 -0
  38. data/spec/dummy/db/migrate/20121213234213_financial_accounting_services.erp_financial_accounting.rb +50 -0
  39. data/spec/dummy/db/migrate/20121213234214_base_tech_services.erp_tech_svcs.rb +255 -0
  40. data/spec/dummy/db/migrate/20121213234215_create_has_attribute_tables.erp_tech_svcs.rb +39 -0
  41. data/spec/dummy/db/migrate/20121213234216_base_orders.erp_orders.rb +178 -0
  42. data/spec/dummy/db/migrate/20121213234217_base_products.erp_products.rb +234 -0
  43. data/spec/dummy/db/migrate/20121213234218_base_products_indexes.erp_products.rb +59 -0
  44. data/spec/dummy/db/migrate/20121213234219_base_txns_and_accts.erp_txns_and_accts.rb +364 -0
  45. data/spec/dummy/db/migrate/20121213234220_agreements_services.erp_agreements.rb +160 -0
  46. data/spec/dummy/db/migrate/20121213234221_agreements_services_indexes.erp_agreements.rb +52 -0
  47. data/spec/dummy/db/migrate/20121213234222_base_app_framework.erp_app.rb +276 -0
  48. data/spec/dummy/db/migrate/20121213234223_erp_commerce_base.erp_commerce.rb +442 -0
  49. data/spec/dummy/db/migrate/20130107180909_create_groups.erp_tech_svcs.rb +19 -0
  50. data/spec/dummy/db/migrate/20130107180910_upgrade_security.erp_tech_svcs.rb +54 -0
  51. data/spec/dummy/db/migrate/20130107180911_upgrade_security2.erp_tech_svcs.rb +270 -0
  52. data/spec/dummy/db/schema.rb +1827 -0
  53. data/spec/dummy/db/spec.sqlite3 +0 -0
  54. data/spec/dummy/log/spec.log +9739 -0
  55. data/spec/spec_helper.rb +12 -3
  56. metadata +161 -24
@@ -0,0 +1,1827 @@
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 => 20121213234223) do
15
+
16
+ create_table "accepted_credit_cards", :force => true do |t|
17
+ t.integer "organization_id"
18
+ t.string "card_type"
19
+ t.datetime "created_at", :null => false
20
+ t.datetime "updated_at", :null => false
21
+ end
22
+
23
+ create_table "agreement_item_types", :force => true do |t|
24
+ t.integer "parent_id"
25
+ t.integer "lft"
26
+ t.integer "rgt"
27
+ t.string "description"
28
+ t.string "comments"
29
+ t.string "internal_identifier"
30
+ t.string "external_identifier"
31
+ t.string "external_id_source"
32
+ t.datetime "created_at", :null => false
33
+ t.datetime "updated_at", :null => false
34
+ end
35
+
36
+ add_index "agreement_item_types", ["parent_id"], :name => "index_agreement_item_types_on_parent_id"
37
+
38
+ create_table "agreement_items", :force => true do |t|
39
+ t.integer "agreement_id"
40
+ t.integer "agreement_item_type_id"
41
+ t.string "agreement_item_value"
42
+ t.string "description"
43
+ t.string "agreement_item_rule_string"
44
+ t.datetime "created_at", :null => false
45
+ t.datetime "updated_at", :null => false
46
+ end
47
+
48
+ add_index "agreement_items", ["agreement_id"], :name => "index_agreement_items_on_agreement_id"
49
+ add_index "agreement_items", ["agreement_item_type_id"], :name => "index_agreement_items_on_agreement_item_type_id"
50
+
51
+ create_table "agreement_party_roles", :force => true do |t|
52
+ t.string "description"
53
+ t.integer "agreement_id"
54
+ t.integer "party_id"
55
+ t.integer "role_type_id"
56
+ t.string "external_identifier"
57
+ t.string "external_id_source"
58
+ t.datetime "created_at", :null => false
59
+ t.datetime "updated_at", :null => false
60
+ end
61
+
62
+ add_index "agreement_party_roles", ["agreement_id"], :name => "index_agreement_party_roles_on_agreement_id"
63
+ add_index "agreement_party_roles", ["party_id"], :name => "index_agreement_party_roles_on_party_id"
64
+ add_index "agreement_party_roles", ["role_type_id"], :name => "index_agreement_party_roles_on_role_type_id"
65
+
66
+ create_table "agreement_relationships", :force => true do |t|
67
+ t.integer "agreement_reln_type_id"
68
+ t.string "description"
69
+ t.integer "agreement_id_from"
70
+ t.integer "agreement_id_to"
71
+ t.integer "role_type_id_from"
72
+ t.integer "role_type_id_to"
73
+ t.integer "status_type_id"
74
+ t.date "from_date"
75
+ t.date "thru_date"
76
+ t.datetime "created_at", :null => false
77
+ t.datetime "updated_at", :null => false
78
+ end
79
+
80
+ add_index "agreement_relationships", ["agreement_reln_type_id"], :name => "index_agreement_relationships_on_agreement_reln_type_id"
81
+ add_index "agreement_relationships", ["status_type_id"], :name => "index_agreement_relationships_on_status_type_id"
82
+
83
+ create_table "agreement_reln_types", :force => true do |t|
84
+ t.integer "parent_id"
85
+ t.integer "lft"
86
+ t.integer "rgt"
87
+ t.integer "valid_from_role_type_id"
88
+ t.integer "valid_to_role_type_id"
89
+ t.string "name"
90
+ t.string "description"
91
+ t.string "internal_identifier"
92
+ t.string "external_identifier"
93
+ t.string "external_id_source"
94
+ t.datetime "created_at", :null => false
95
+ t.datetime "updated_at", :null => false
96
+ end
97
+
98
+ add_index "agreement_reln_types", ["parent_id"], :name => "index_agreement_reln_types_on_parent_id"
99
+ add_index "agreement_reln_types", ["valid_from_role_type_id"], :name => "index_agreement_reln_types_on_valid_from_role_type_id"
100
+ add_index "agreement_reln_types", ["valid_to_role_type_id"], :name => "index_agreement_reln_types_on_valid_to_role_type_id"
101
+
102
+ create_table "agreement_role_types", :force => true do |t|
103
+ t.integer "parent_id"
104
+ t.integer "lft"
105
+ t.integer "rgt"
106
+ t.string "description"
107
+ t.string "comments"
108
+ t.string "internal_identifier"
109
+ t.string "external_identifier"
110
+ t.string "external_id_source"
111
+ t.datetime "created_at", :null => false
112
+ t.datetime "updated_at", :null => false
113
+ end
114
+
115
+ add_index "agreement_role_types", ["parent_id"], :name => "index_agreement_role_types_on_parent_id"
116
+
117
+ create_table "agreement_types", :force => true do |t|
118
+ t.integer "parent_id"
119
+ t.integer "lft"
120
+ t.integer "rgt"
121
+ t.string "description"
122
+ t.string "comments"
123
+ t.string "internal_identifier"
124
+ t.string "external_identifier"
125
+ t.string "external_id_source"
126
+ t.datetime "created_at", :null => false
127
+ t.datetime "updated_at", :null => false
128
+ end
129
+
130
+ add_index "agreement_types", ["parent_id"], :name => "index_agreement_types_on_parent_id"
131
+
132
+ create_table "agreements", :force => true do |t|
133
+ t.string "description"
134
+ t.integer "agreement_type_id"
135
+ t.string "agreement_status"
136
+ t.integer "product_id"
137
+ t.date "agreement_date"
138
+ t.date "from_date"
139
+ t.date "thru_date"
140
+ t.string "external_identifier"
141
+ t.string "external_id_source"
142
+ t.datetime "created_at", :null => false
143
+ t.datetime "updated_at", :null => false
144
+ end
145
+
146
+ add_index "agreements", ["agreement_type_id"], :name => "index_agreements_on_agreement_type_id"
147
+ add_index "agreements", ["product_id"], :name => "index_agreements_on_product_id"
148
+
149
+ create_table "app_containers", :force => true do |t|
150
+ t.integer "user_id"
151
+ t.string "description"
152
+ t.string "internal_identifier"
153
+ t.string "type"
154
+ t.datetime "created_at", :null => false
155
+ t.datetime "updated_at", :null => false
156
+ end
157
+
158
+ add_index "app_containers", ["type"], :name => "index_app_containers_on_type"
159
+ add_index "app_containers", ["user_id"], :name => "index_app_containers_on_user_id"
160
+
161
+ create_table "app_containers_applications", :id => false, :force => true do |t|
162
+ t.integer "app_container_id"
163
+ t.integer "application_id"
164
+ end
165
+
166
+ add_index "app_containers_applications", ["app_container_id"], :name => "index_app_containers_applications_on_app_container_id"
167
+ add_index "app_containers_applications", ["application_id"], :name => "index_app_containers_applications_on_application_id"
168
+
169
+ create_table "applications", :force => true do |t|
170
+ t.string "description"
171
+ t.string "icon"
172
+ t.string "internal_identifier"
173
+ t.string "javascript_class_name"
174
+ t.string "shortcut_id"
175
+ t.string "base_url"
176
+ t.string "type"
177
+ t.datetime "created_at", :null => false
178
+ t.datetime "updated_at", :null => false
179
+ end
180
+
181
+ create_table "applications_widgets", :id => false, :force => true do |t|
182
+ t.integer "application_id"
183
+ t.integer "widget_id"
184
+ end
185
+
186
+ add_index "applications_widgets", ["application_id"], :name => "index_applications_widgets_on_application_id"
187
+ add_index "applications_widgets", ["widget_id"], :name => "index_applications_widgets_on_widget_id"
188
+
189
+ create_table "attribute_types", :force => true do |t|
190
+ t.string "internal_identifier"
191
+ t.string "description"
192
+ t.string "data_type"
193
+ t.datetime "created_at", :null => false
194
+ t.datetime "updated_at", :null => false
195
+ end
196
+
197
+ add_index "attribute_types", ["internal_identifier"], :name => ":attribute_types_iid_idx"
198
+
199
+ create_table "attribute_values", :force => true do |t|
200
+ t.integer "attributed_record_id"
201
+ t.string "attributed_record_type"
202
+ t.integer "attribute_type_id"
203
+ t.string "value"
204
+ t.datetime "created_at", :null => false
205
+ t.datetime "updated_at", :null => false
206
+ end
207
+
208
+ add_index "attribute_values", ["attribute_type_id"], :name => "attribute_values_attributed_type_idx"
209
+ add_index "attribute_values", ["attributed_record_id", "attributed_record_type"], :name => "attribute_values_attributed_record_idx"
210
+ add_index "attribute_values", ["value"], :name => "attribute_values_value_idx"
211
+
212
+ create_table "audit_log_item_types", :force => true do |t|
213
+ t.string "internal_identifier"
214
+ t.string "external_identifier"
215
+ t.string "external_id_source"
216
+ t.string "description"
217
+ t.string "comments"
218
+ t.integer "parent_id"
219
+ t.integer "lft"
220
+ t.integer "rgt"
221
+ t.datetime "created_at", :null => false
222
+ t.datetime "updated_at", :null => false
223
+ end
224
+
225
+ create_table "audit_log_items", :force => true do |t|
226
+ t.integer "audit_log_id"
227
+ t.integer "audit_log_item_type_id"
228
+ t.string "audit_log_item_value"
229
+ t.string "description"
230
+ t.datetime "created_at", :null => false
231
+ t.datetime "updated_at", :null => false
232
+ end
233
+
234
+ create_table "audit_log_types", :force => true do |t|
235
+ t.string "description"
236
+ t.string "error_code"
237
+ t.string "comments"
238
+ t.string "internal_identifier"
239
+ t.string "external_identifier"
240
+ t.string "external_id_source"
241
+ t.integer "parent_id"
242
+ t.integer "lft"
243
+ t.integer "rgt"
244
+ t.datetime "created_at", :null => false
245
+ t.datetime "updated_at", :null => false
246
+ end
247
+
248
+ create_table "audit_logs", :force => true do |t|
249
+ t.string "application"
250
+ t.string "description"
251
+ t.integer "party_id"
252
+ t.text "additional_info"
253
+ t.integer "audit_log_type_id"
254
+ t.integer "event_record_id"
255
+ t.string "event_record_type"
256
+ t.datetime "created_at", :null => false
257
+ t.datetime "updated_at", :null => false
258
+ end
259
+
260
+ add_index "audit_logs", ["event_record_id", "event_record_type"], :name => "event_record_index"
261
+ add_index "audit_logs", ["party_id"], :name => "index_audit_logs_on_party_id"
262
+
263
+ create_table "bank_account_types", :force => true do |t|
264
+ t.string "description"
265
+ t.string "internal_identifier"
266
+ t.datetime "created_at", :null => false
267
+ t.datetime "updated_at", :null => false
268
+ end
269
+
270
+ create_table "bank_accounts", :force => true do |t|
271
+ t.string "routing_number"
272
+ t.string "crypted_private_account_number"
273
+ t.string "name_on_account"
274
+ t.integer "bank_account_type_id"
275
+ t.datetime "created_at", :null => false
276
+ t.datetime "updated_at", :null => false
277
+ end
278
+
279
+ add_index "bank_accounts", ["bank_account_type_id"], :name => "bank_accounts_account_type_idx"
280
+
281
+ create_table "base_txn_contexts", :force => true do |t|
282
+ t.integer "biz_txn_event_id"
283
+ t.integer "txn_context_record_id"
284
+ t.string "txn_context_record_type"
285
+ t.datetime "created_at", :null => false
286
+ t.datetime "updated_at", :null => false
287
+ end
288
+
289
+ add_index "base_txn_contexts", ["txn_context_record_id", "txn_context_record_type"], :name => "txn_context_record_idx"
290
+
291
+ create_table "biz_acct_txn_tasks", :force => true do |t|
292
+ t.integer "biz_txn_task_id"
293
+ t.integer "biz_txn_account_id"
294
+ t.string "description"
295
+ t.string "comments"
296
+ t.datetime "entered_date"
297
+ t.datetime "requested_date"
298
+ t.datetime "created_at", :null => false
299
+ t.datetime "updated_at", :null => false
300
+ end
301
+
302
+ add_index "biz_acct_txn_tasks", ["biz_txn_account_id"], :name => "index_biz_acct_txn_tasks_on_biz_txn_account_id"
303
+ add_index "biz_acct_txn_tasks", ["biz_txn_task_id"], :name => "index_biz_acct_txn_tasks_on_biz_txn_task_id"
304
+
305
+ create_table "biz_txn_acct_party_roles", :force => true do |t|
306
+ t.string "description"
307
+ t.integer "biz_txn_acct_root_id"
308
+ t.integer "party_id"
309
+ t.integer "biz_txn_acct_pty_rtype_id"
310
+ t.integer "is_default_billing_acct_flag"
311
+ t.datetime "created_at", :null => false
312
+ t.datetime "updated_at", :null => false
313
+ end
314
+
315
+ add_index "biz_txn_acct_party_roles", ["biz_txn_acct_pty_rtype_id"], :name => "index_biz_txn_acct_party_roles_on_biz_txn_acct_pty_rtype_id"
316
+ add_index "biz_txn_acct_party_roles", ["biz_txn_acct_root_id"], :name => "index_biz_txn_acct_party_roles_on_biz_txn_acct_root_id"
317
+ add_index "biz_txn_acct_party_roles", ["party_id"], :name => "index_biz_txn_acct_party_roles_on_party_id"
318
+
319
+ create_table "biz_txn_acct_pty_rtypes", :force => true do |t|
320
+ t.integer "parent_id"
321
+ t.integer "lft"
322
+ t.integer "rgt"
323
+ t.string "description"
324
+ t.string "comments"
325
+ t.string "internal_identifier"
326
+ t.string "external_identifier"
327
+ t.string "external_id_source"
328
+ t.datetime "created_at", :null => false
329
+ t.datetime "updated_at", :null => false
330
+ end
331
+
332
+ add_index "biz_txn_acct_pty_rtypes", ["parent_id"], :name => "index_biz_txn_acct_pty_rtypes_on_parent_id"
333
+
334
+ create_table "biz_txn_acct_rel_types", :force => true do |t|
335
+ t.integer "parent_id"
336
+ t.integer "lft"
337
+ t.integer "rgt"
338
+ t.string "description"
339
+ t.string "comments"
340
+ t.string "internal_identifier"
341
+ t.string "external_identifier"
342
+ t.string "external_id_source"
343
+ t.datetime "created_at", :null => false
344
+ t.datetime "updated_at", :null => false
345
+ end
346
+
347
+ add_index "biz_txn_acct_rel_types", ["parent_id"], :name => "index_biz_txn_acct_rel_types_on_parent_id"
348
+
349
+ create_table "biz_txn_acct_relationships", :force => true do |t|
350
+ t.integer "biz_txn_acct_rel_type_id"
351
+ t.string "description"
352
+ t.integer "biz_txn_acct_root_id_from"
353
+ t.integer "biz_txn_acct_root_id_to"
354
+ t.integer "status_type_id"
355
+ t.date "from_date"
356
+ t.date "thru_date"
357
+ t.datetime "created_at", :null => false
358
+ t.datetime "updated_at", :null => false
359
+ end
360
+
361
+ add_index "biz_txn_acct_relationships", ["biz_txn_acct_rel_type_id"], :name => "index_biz_txn_acct_relationships_on_biz_txn_acct_rel_type_id"
362
+ add_index "biz_txn_acct_relationships", ["status_type_id"], :name => "index_biz_txn_acct_relationships_on_status_type_id"
363
+
364
+ create_table "biz_txn_acct_roots", :force => true do |t|
365
+ t.string "description"
366
+ t.integer "status"
367
+ t.integer "biz_txn_acct_id"
368
+ t.string "biz_txn_acct_type"
369
+ t.string "external_identifier"
370
+ t.string "external_id_source"
371
+ t.string "type"
372
+ t.datetime "created_at", :null => false
373
+ t.datetime "updated_at", :null => false
374
+ end
375
+
376
+ add_index "biz_txn_acct_roots", ["biz_txn_acct_id", "biz_txn_acct_type"], :name => "btai_2"
377
+
378
+ create_table "biz_txn_acct_status_types", :force => true do |t|
379
+ t.datetime "created_at", :null => false
380
+ t.datetime "updated_at", :null => false
381
+ end
382
+
383
+ create_table "biz_txn_acct_statuses", :force => true do |t|
384
+ t.datetime "created_at", :null => false
385
+ t.datetime "updated_at", :null => false
386
+ end
387
+
388
+ create_table "biz_txn_acct_types", :force => true do |t|
389
+ t.integer "parent_id"
390
+ t.integer "lft"
391
+ t.integer "rgt"
392
+ t.string "description"
393
+ t.string "comments"
394
+ t.string "internal_identifier"
395
+ t.string "external_identifier"
396
+ t.string "external_id_source"
397
+ t.datetime "created_at", :null => false
398
+ t.datetime "updated_at", :null => false
399
+ end
400
+
401
+ add_index "biz_txn_acct_types", ["parent_id"], :name => "index_biz_txn_acct_types_on_parent_id"
402
+
403
+ create_table "biz_txn_agreement_role_types", :force => true do |t|
404
+ t.integer "parent_id"
405
+ t.integer "lft"
406
+ t.integer "rgt"
407
+ t.string "description"
408
+ t.string "comments"
409
+ t.string "internal_identifier"
410
+ t.datetime "created_at", :null => false
411
+ t.datetime "updated_at", :null => false
412
+ end
413
+
414
+ add_index "biz_txn_agreement_role_types", ["parent_id"], :name => "index_biz_txn_agreement_role_types_on_parent_id"
415
+
416
+ create_table "biz_txn_agreement_roles", :force => true do |t|
417
+ t.integer "biz_txn_event_id"
418
+ t.string "biz_txn_event_type"
419
+ t.integer "agreement_id"
420
+ t.integer "biz_txn_agreement_role_type_id"
421
+ t.datetime "created_at", :null => false
422
+ t.datetime "updated_at", :null => false
423
+ end
424
+
425
+ add_index "biz_txn_agreement_roles", ["agreement_id"], :name => "index_biz_txn_agreement_roles_on_agreement_id"
426
+ add_index "biz_txn_agreement_roles", ["biz_txn_agreement_role_type_id"], :name => "index_biz_txn_agreement_roles_on_biz_txn_agreement_role_type_id"
427
+
428
+ create_table "biz_txn_event_descs", :force => true do |t|
429
+ t.integer "biz_txn_event_id"
430
+ t.integer "language_id"
431
+ t.integer "locale_id"
432
+ t.integer "priority"
433
+ t.integer "sequence"
434
+ t.string "short_description"
435
+ t.string "long_description"
436
+ t.datetime "created_at", :null => false
437
+ t.datetime "updated_at", :null => false
438
+ end
439
+
440
+ add_index "biz_txn_event_descs", ["biz_txn_event_id"], :name => "index_biz_txn_event_descs_on_biz_txn_event_id"
441
+ add_index "biz_txn_event_descs", ["language_id"], :name => "index_biz_txn_event_descs_on_language_id"
442
+ add_index "biz_txn_event_descs", ["locale_id"], :name => "index_biz_txn_event_descs_on_locale_id"
443
+
444
+ create_table "biz_txn_events", :force => true do |t|
445
+ t.string "description"
446
+ t.integer "biz_txn_acct_root_id"
447
+ t.integer "biz_txn_type_id"
448
+ t.datetime "entered_date"
449
+ t.datetime "post_date"
450
+ t.integer "biz_txn_record_id"
451
+ t.string "biz_txn_record_type"
452
+ t.string "external_identifier"
453
+ t.string "external_id_source"
454
+ t.datetime "created_at", :null => false
455
+ t.datetime "updated_at", :null => false
456
+ end
457
+
458
+ add_index "biz_txn_events", ["biz_txn_acct_root_id"], :name => "index_biz_txn_events_on_biz_txn_acct_root_id"
459
+ add_index "biz_txn_events", ["biz_txn_record_id", "biz_txn_record_type"], :name => "btai_1"
460
+ add_index "biz_txn_events", ["biz_txn_type_id"], :name => "index_biz_txn_events_on_biz_txn_type_id"
461
+
462
+ create_table "biz_txn_party_role_types", :force => true do |t|
463
+ t.integer "parent_id"
464
+ t.integer "lft"
465
+ t.integer "rgt"
466
+ t.string "description"
467
+ t.string "comments"
468
+ t.string "internal_identifier"
469
+ t.datetime "created_at", :null => false
470
+ t.datetime "updated_at", :null => false
471
+ end
472
+
473
+ add_index "biz_txn_party_role_types", ["parent_id"], :name => "index_biz_txn_party_role_types_on_parent_id"
474
+
475
+ create_table "biz_txn_party_roles", :force => true do |t|
476
+ t.integer "biz_txn_event_id"
477
+ t.integer "party_id"
478
+ t.integer "biz_txn_party_role_type_id"
479
+ t.datetime "created_at", :null => false
480
+ t.datetime "updated_at", :null => false
481
+ end
482
+
483
+ add_index "biz_txn_party_roles", ["biz_txn_event_id"], :name => "index_biz_txn_party_roles_on_biz_txn_event_id"
484
+ add_index "biz_txn_party_roles", ["biz_txn_party_role_type_id"], :name => "index_biz_txn_party_roles_on_biz_txn_party_role_type_id"
485
+ add_index "biz_txn_party_roles", ["party_id"], :name => "index_biz_txn_party_roles_on_party_id"
486
+
487
+ create_table "biz_txn_rel_types", :force => true do |t|
488
+ t.integer "parent_id"
489
+ t.integer "lft"
490
+ t.integer "rgt"
491
+ t.string "description"
492
+ t.string "comments"
493
+ t.string "internal_identifier"
494
+ t.string "external_identifier"
495
+ t.string "external_id_source"
496
+ t.datetime "created_at", :null => false
497
+ t.datetime "updated_at", :null => false
498
+ end
499
+
500
+ add_index "biz_txn_rel_types", ["parent_id"], :name => "index_biz_txn_rel_types_on_parent_id"
501
+
502
+ create_table "biz_txn_relationships", :force => true do |t|
503
+ t.integer "biz_txn_rel_type_id"
504
+ t.string "description"
505
+ t.integer "txn_event_id_from"
506
+ t.integer "txn_event_id_to"
507
+ t.integer "status_type_id"
508
+ t.date "from_date"
509
+ t.date "thru_date"
510
+ t.datetime "created_at", :null => false
511
+ t.datetime "updated_at", :null => false
512
+ end
513
+
514
+ add_index "biz_txn_relationships", ["biz_txn_rel_type_id"], :name => "index_biz_txn_relationships_on_biz_txn_rel_type_id"
515
+ add_index "biz_txn_relationships", ["status_type_id"], :name => "index_biz_txn_relationships_on_status_type_id"
516
+
517
+ create_table "biz_txn_statuses", :force => true do |t|
518
+ t.string "description"
519
+ t.string "comments"
520
+ t.datetime "created_at", :null => false
521
+ t.datetime "updated_at", :null => false
522
+ end
523
+
524
+ create_table "biz_txn_task_types", :force => true do |t|
525
+ t.integer "parent_id"
526
+ t.integer "lft"
527
+ t.integer "rgt"
528
+ t.string "description"
529
+ t.string "comments"
530
+ t.datetime "created_at", :null => false
531
+ t.datetime "updated_at", :null => false
532
+ end
533
+
534
+ add_index "biz_txn_task_types", ["parent_id"], :name => "index_biz_txn_task_types_on_parent_id"
535
+
536
+ create_table "biz_txn_tasks", :force => true do |t|
537
+ t.string "description"
538
+ t.datetime "created_at", :null => false
539
+ t.datetime "updated_at", :null => false
540
+ end
541
+
542
+ create_table "biz_txn_types", :force => true do |t|
543
+ t.integer "parent_id"
544
+ t.integer "lft"
545
+ t.integer "rgt"
546
+ t.string "description"
547
+ t.string "comments"
548
+ t.string "internal_identifier"
549
+ t.string "external_identifier"
550
+ t.string "external_id_source"
551
+ t.datetime "created_at", :null => false
552
+ t.datetime "updated_at", :null => false
553
+ end
554
+
555
+ add_index "biz_txn_types", ["parent_id", "lft", "rgt"], :name => "biz_txn_type_nested_set_idx"
556
+
557
+ create_table "capabilities", :force => true do |t|
558
+ t.string "resource"
559
+ t.integer "capability_type_id"
560
+ t.datetime "created_at", :null => false
561
+ t.datetime "updated_at", :null => false
562
+ end
563
+
564
+ add_index "capabilities", ["capability_type_id"], :name => "index_capabilities_on_capability_type_id"
565
+
566
+ create_table "capabilities_capable_models", :id => false, :force => true do |t|
567
+ t.integer "capable_model_id"
568
+ t.integer "capability_id"
569
+ end
570
+
571
+ add_index "capabilities_capable_models", ["capability_id"], :name => "index_capabilities_capable_models_on_capability_id"
572
+ add_index "capabilities_capable_models", ["capable_model_id"], :name => "index_capabilities_capable_models_on_capable_model_id"
573
+
574
+ create_table "capability_types", :force => true do |t|
575
+ t.string "internal_identifier"
576
+ t.string "description"
577
+ t.datetime "created_at", :null => false
578
+ t.datetime "updated_at", :null => false
579
+ end
580
+
581
+ create_table "capable_models", :force => true do |t|
582
+ t.integer "capable_model_record_id"
583
+ t.string "capable_model_record_type"
584
+ t.datetime "created_at", :null => false
585
+ t.datetime "updated_at", :null => false
586
+ end
587
+
588
+ add_index "capable_models", ["capable_model_record_id", "capable_model_record_type"], :name => "capable_model_record_idx"
589
+
590
+ create_table "categories", :force => true do |t|
591
+ t.string "description"
592
+ t.string "external_identifier"
593
+ t.datetime "from_date"
594
+ t.datetime "to_date"
595
+ t.string "internal_identifier"
596
+ t.integer "category_record_id"
597
+ t.string "category_record_type"
598
+ t.integer "parent_id"
599
+ t.integer "lft"
600
+ t.integer "rgt"
601
+ t.datetime "created_at", :null => false
602
+ t.datetime "updated_at", :null => false
603
+ end
604
+
605
+ add_index "categories", ["category_record_id", "category_record_type"], :name => "category_polymorphic"
606
+
607
+ create_table "category_classifications", :force => true do |t|
608
+ t.integer "category_id"
609
+ t.string "classification_type"
610
+ t.integer "classification_id"
611
+ t.datetime "from_date"
612
+ t.datetime "to_date"
613
+ t.datetime "created_at", :null => false
614
+ t.datetime "updated_at", :null => false
615
+ end
616
+
617
+ add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
618
+
619
+ create_table "charge_line_payment_txns", :force => true do |t|
620
+ t.integer "charge_line_id"
621
+ t.integer "payment_txn_id"
622
+ t.string "payment_txn_type"
623
+ t.datetime "created_at", :null => false
624
+ t.datetime "updated_at", :null => false
625
+ end
626
+
627
+ add_index "charge_line_payment_txns", ["charge_line_id"], :name => "index_charge_line_payment_txns_on_charge_line_id"
628
+ add_index "charge_line_payment_txns", ["payment_txn_id", "payment_txn_type"], :name => "payment_txn_idx"
629
+
630
+ create_table "charge_lines", :force => true do |t|
631
+ t.string "sti_type"
632
+ t.integer "money_id"
633
+ t.string "description"
634
+ t.string "external_identifier"
635
+ t.string "external_id_source"
636
+ t.integer "charged_item_id"
637
+ t.string "charged_item_type"
638
+ t.datetime "created_at", :null => false
639
+ t.datetime "updated_at", :null => false
640
+ end
641
+
642
+ add_index "charge_lines", ["charged_item_id", "charged_item_type"], :name => "charged_item_idx"
643
+
644
+ create_table "compass_ae_instances", :force => true do |t|
645
+ t.decimal "version", :precision => 3, :scale => 8
646
+ t.datetime "created_at", :null => false
647
+ t.datetime "updated_at", :null => false
648
+ end
649
+
650
+ create_table "configuration_item_types", :force => true do |t|
651
+ t.integer "parent_id"
652
+ t.integer "lft"
653
+ t.integer "rgt"
654
+ t.string "description"
655
+ t.string "internal_identifier"
656
+ t.boolean "allow_user_defined_options", :default => false
657
+ t.boolean "is_multi_optional", :default => false
658
+ t.datetime "created_at", :null => false
659
+ t.datetime "updated_at", :null => false
660
+ end
661
+
662
+ create_table "configuration_item_types_configuration_options", :force => true do |t|
663
+ t.integer "configuration_item_type_id"
664
+ t.integer "configuration_option_id"
665
+ t.boolean "is_default", :default => false
666
+ t.datetime "created_at", :null => false
667
+ t.datetime "updated_at", :null => false
668
+ end
669
+
670
+ add_index "configuration_item_types_configuration_options", ["configuration_item_type_id"], :name => "conf_item_type_conf_opt_id_item_idx"
671
+ add_index "configuration_item_types_configuration_options", ["configuration_option_id"], :name => "conf_item_type_conf_opt_id_opt_idx"
672
+
673
+ create_table "configuration_item_types_configurations", :id => false, :force => true do |t|
674
+ t.integer "configuration_item_type_id"
675
+ t.integer "configuration_id"
676
+ end
677
+
678
+ add_index "configuration_item_types_configurations", ["configuration_id"], :name => "conf_id_idx"
679
+ add_index "configuration_item_types_configurations", ["configuration_item_type_id", "configuration_id"], :name => "conf_config_type_uniq_idx", :unique => true
680
+ add_index "configuration_item_types_configurations", ["configuration_item_type_id"], :name => "conf_conf_type_id_item_idx"
681
+
682
+ create_table "configuration_items", :force => true do |t|
683
+ t.integer "configuration_id"
684
+ t.integer "configuration_item_type_id"
685
+ t.integer "configuration_option_id"
686
+ t.datetime "created_at", :null => false
687
+ t.datetime "updated_at", :null => false
688
+ end
689
+
690
+ add_index "configuration_items", ["configuration_id"], :name => "index_configuration_items_on_configuration_id"
691
+ add_index "configuration_items", ["configuration_item_type_id"], :name => "index_configuration_items_on_configuration_item_type_id"
692
+ add_index "configuration_items", ["configuration_option_id"], :name => "index_configuration_items_on_configuration_option_id"
693
+
694
+ create_table "configuration_items_configuration_options", :id => false, :force => true do |t|
695
+ t.integer "configuration_item_id"
696
+ t.integer "configuration_option_id"
697
+ end
698
+
699
+ add_index "configuration_items_configuration_options", ["configuration_item_id"], :name => "conf_item_conf_opt_id_item_idx"
700
+ add_index "configuration_items_configuration_options", ["configuration_option_id"], :name => "conf_item_conf_opt_id_opt_idx"
701
+
702
+ create_table "configuration_options", :force => true do |t|
703
+ t.string "description"
704
+ t.string "internal_identifier"
705
+ t.string "value"
706
+ t.text "comment"
707
+ t.boolean "user_defined", :default => false
708
+ t.datetime "created_at", :null => false
709
+ t.datetime "updated_at", :null => false
710
+ end
711
+
712
+ add_index "configuration_options", ["internal_identifier"], :name => "index_configuration_options_on_internal_identifier"
713
+ add_index "configuration_options", ["user_defined"], :name => "index_configuration_options_on_user_defined"
714
+ add_index "configuration_options", ["value"], :name => "index_configuration_options_on_value"
715
+
716
+ create_table "configurations", :force => true do |t|
717
+ t.string "description"
718
+ t.string "internal_identifier"
719
+ t.boolean "active"
720
+ t.boolean "is_template", :default => false
721
+ t.datetime "created_at", :null => false
722
+ t.datetime "updated_at", :null => false
723
+ end
724
+
725
+ add_index "configurations", ["is_template"], :name => "index_configurations_on_is_template"
726
+
727
+ create_table "contact_purposes", :force => true do |t|
728
+ t.integer "parent_id"
729
+ t.integer "lft"
730
+ t.integer "rgt"
731
+ t.string "description"
732
+ t.string "comments"
733
+ t.string "internal_identifier"
734
+ t.string "external_identifier"
735
+ t.string "external_id_source"
736
+ t.datetime "created_at", :null => false
737
+ t.datetime "updated_at", :null => false
738
+ end
739
+
740
+ add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
741
+
742
+ create_table "contact_purposes_contacts", :id => false, :force => true do |t|
743
+ t.integer "contact_id"
744
+ t.integer "contact_purpose_id"
745
+ end
746
+
747
+ add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
748
+
749
+ create_table "contact_types", :force => true do |t|
750
+ t.integer "parent_id"
751
+ t.integer "lft"
752
+ t.integer "rgt"
753
+ t.string "description"
754
+ t.string "comments"
755
+ t.string "internal_identifier"
756
+ t.string "external_identifier"
757
+ t.string "external_id_source"
758
+ t.datetime "created_at", :null => false
759
+ t.datetime "updated_at", :null => false
760
+ end
761
+
762
+ add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
763
+
764
+ create_table "contacts", :force => true do |t|
765
+ t.integer "party_id"
766
+ t.integer "contact_mechanism_id"
767
+ t.string "contact_mechanism_type"
768
+ t.string "external_identifier"
769
+ t.string "external_id_source"
770
+ t.datetime "created_at", :null => false
771
+ t.datetime "updated_at", :null => false
772
+ end
773
+
774
+ add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
775
+ add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
776
+
777
+ create_table "credit_card_account_party_roles", :force => true do |t|
778
+ t.integer "credit_card_account_id"
779
+ t.integer "role_type_id"
780
+ t.integer "party_id"
781
+ t.integer "credit_card_id"
782
+ t.datetime "created_at", :null => false
783
+ t.datetime "updated_at", :null => false
784
+ end
785
+
786
+ add_index "credit_card_account_party_roles", ["credit_card_account_id"], :name => "index_credit_card_account_party_roles_on_credit_card_account_id"
787
+ add_index "credit_card_account_party_roles", ["credit_card_id"], :name => "index_credit_card_account_party_roles_on_credit_card_id"
788
+ add_index "credit_card_account_party_roles", ["party_id"], :name => "index_credit_card_account_party_roles_on_party_id"
789
+ add_index "credit_card_account_party_roles", ["role_type_id"], :name => "index_credit_card_account_party_roles_on_role_type_id"
790
+
791
+ create_table "credit_card_account_purposes", :force => true do |t|
792
+ t.integer "parent_id"
793
+ t.integer "lft"
794
+ t.integer "rgt"
795
+ t.string "description"
796
+ t.string "comments"
797
+ t.string "internal_identifier"
798
+ t.string "external_identifier"
799
+ t.string "external_id_source"
800
+ t.datetime "created_at", :null => false
801
+ t.datetime "updated_at", :null => false
802
+ end
803
+
804
+ create_table "credit_card_accounts", :force => true do |t|
805
+ t.datetime "created_at", :null => false
806
+ t.datetime "updated_at", :null => false
807
+ end
808
+
809
+ create_table "credit_cards", :force => true do |t|
810
+ t.string "crypted_private_card_number"
811
+ t.integer "expiration_month"
812
+ t.integer "expiration_year"
813
+ t.string "description"
814
+ t.string "first_name_on_card"
815
+ t.string "last_name_on_card"
816
+ t.string "card_type"
817
+ t.integer "postal_address_id"
818
+ t.integer "credit_card_account_purpose_id"
819
+ t.string "credit_card_token"
820
+ t.datetime "created_at", :null => false
821
+ t.datetime "updated_at", :null => false
822
+ end
823
+
824
+ create_table "currencies", :force => true do |t|
825
+ t.string "name"
826
+ t.string "definition"
827
+ t.string "internal_identifier"
828
+ t.string "numeric_code"
829
+ t.string "major_unit_symbol"
830
+ t.string "minor_unit_symbol"
831
+ t.string "ratio_of_minor_unit_to_major_unit"
832
+ t.string "postfix_label"
833
+ t.datetime "introduction_date"
834
+ t.datetime "expiration_date"
835
+ t.datetime "created_at", :null => false
836
+ t.datetime "updated_at", :null => false
837
+ end
838
+
839
+ add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
840
+
841
+ create_table "delayed_jobs", :force => true do |t|
842
+ t.integer "priority", :default => 0
843
+ t.integer "attempts", :default => 0
844
+ t.text "handler"
845
+ t.text "last_error"
846
+ t.datetime "run_at"
847
+ t.datetime "locked_at"
848
+ t.datetime "failed_at"
849
+ t.string "locked_by"
850
+ t.string "queue"
851
+ t.datetime "created_at", :null => false
852
+ t.datetime "updated_at", :null => false
853
+ end
854
+
855
+ add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
856
+
857
+ create_table "descriptive_assets", :force => true do |t|
858
+ t.integer "view_type_id"
859
+ t.string "internal_identifier"
860
+ t.text "description"
861
+ t.string "external_identifier"
862
+ t.string "external_id_source"
863
+ t.integer "described_record_id"
864
+ t.string "described_record_type"
865
+ t.datetime "created_at", :null => false
866
+ t.datetime "updated_at", :null => false
867
+ end
868
+
869
+ add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
870
+ add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
871
+
872
+ create_table "email_addresses", :force => true do |t|
873
+ t.string "email_address"
874
+ t.string "description"
875
+ t.datetime "created_at", :null => false
876
+ t.datetime "updated_at", :null => false
877
+ end
878
+
879
+ create_table "fee_types", :force => true do |t|
880
+ t.string "internal_identifier"
881
+ t.string "description"
882
+ t.string "comments"
883
+ t.string "external_identifier"
884
+ t.string "external_id_source"
885
+ t.integer "parent_id"
886
+ t.integer "lft"
887
+ t.integer "rgt"
888
+ t.datetime "created_at", :null => false
889
+ t.datetime "updated_at", :null => false
890
+ end
891
+
892
+ create_table "fees", :force => true do |t|
893
+ t.integer "fee_record_id"
894
+ t.string "fee_record_type"
895
+ t.integer "money_id"
896
+ t.integer "fee_type_id"
897
+ t.string "description"
898
+ t.datetime "start_date"
899
+ t.datetime "end_date"
900
+ t.string "external_identifier"
901
+ t.string "external_id_source"
902
+ t.datetime "created_at", :null => false
903
+ t.datetime "updated_at", :null => false
904
+ end
905
+
906
+ add_index "fees", ["fee_record_id", "fee_record_type"], :name => "fee_record_idx"
907
+ add_index "fees", ["fee_type_id"], :name => "index_fees_on_fee_type_id"
908
+ add_index "fees", ["money_id"], :name => "index_fees_on_money_id"
909
+
910
+ create_table "file_assets", :force => true do |t|
911
+ t.integer "file_asset_holder_id"
912
+ t.string "file_asset_holder_type"
913
+ t.string "type"
914
+ t.string "name"
915
+ t.string "directory"
916
+ t.string "data_file_name"
917
+ t.string "data_content_type"
918
+ t.integer "data_file_size"
919
+ t.datetime "data_updated_at"
920
+ t.string "width"
921
+ t.string "height"
922
+ t.datetime "created_at", :null => false
923
+ t.datetime "updated_at", :null => false
924
+ end
925
+
926
+ add_index "file_assets", ["directory"], :name => "index_file_assets_on_directory"
927
+ add_index "file_assets", ["file_asset_holder_id", "file_asset_holder_type"], :name => "file_asset_holder_idx"
928
+ add_index "file_assets", ["name"], :name => "index_file_assets_on_name"
929
+ add_index "file_assets", ["type"], :name => "index_file_assets_on_type"
930
+
931
+ create_table "financial_txn_accounts", :force => true do |t|
932
+ t.string "account_number"
933
+ t.integer "agreement_id"
934
+ t.integer "balance_id"
935
+ t.date "balance_date"
936
+ t.boolean "calculate_balance"
937
+ t.integer "payment_due_id"
938
+ t.date "due_date"
939
+ t.integer "financial_account_id"
940
+ t.string "financial_account_type"
941
+ t.datetime "created_at", :null => false
942
+ t.datetime "updated_at", :null => false
943
+ end
944
+
945
+ create_table "financial_txn_assns", :force => true do |t|
946
+ t.integer "financial_txn_id"
947
+ t.integer "financial_txn_record_id"
948
+ t.string "financial_txn_record_type"
949
+ t.datetime "created_at", :null => false
950
+ t.datetime "updated_at", :null => false
951
+ end
952
+
953
+ create_table "financial_txns", :force => true do |t|
954
+ t.integer "money_id"
955
+ t.date "apply_date"
956
+ t.datetime "created_at", :null => false
957
+ t.datetime "updated_at", :null => false
958
+ end
959
+
960
+ create_table "geo_countries", :force => true do |t|
961
+ t.string "name"
962
+ t.string "iso_code_2"
963
+ t.string "iso_code_3"
964
+ t.boolean "display", :default => true
965
+ t.integer "external_id"
966
+ t.datetime "created_at"
967
+ end
968
+
969
+ add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
970
+ add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
971
+
972
+ create_table "geo_zones", :force => true do |t|
973
+ t.integer "geo_country_id"
974
+ t.string "zone_code", :default => "2"
975
+ t.string "zone_name"
976
+ t.datetime "created_at"
977
+ end
978
+
979
+ add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
980
+ add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
981
+ add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
982
+
983
+ create_table "gl_accounts", :force => true do |t|
984
+ t.integer "parent_id"
985
+ t.integer "lft"
986
+ t.integer "rgt"
987
+ t.string "description"
988
+ t.string "comments"
989
+ t.string "internal_identifier"
990
+ t.string "external_identifier"
991
+ t.string "external_id_source"
992
+ t.datetime "created_at", :null => false
993
+ t.datetime "updated_at", :null => false
994
+ end
995
+
996
+ create_table "individuals", :force => true do |t|
997
+ t.integer "party_id"
998
+ t.string "current_last_name"
999
+ t.string "current_first_name"
1000
+ t.string "current_middle_name"
1001
+ t.string "current_personal_title"
1002
+ t.string "current_suffix"
1003
+ t.string "current_nickname"
1004
+ t.string "gender", :limit => 1
1005
+ t.date "birth_date"
1006
+ t.decimal "height", :precision => 5, :scale => 2
1007
+ t.integer "weight"
1008
+ t.string "mothers_maiden_name"
1009
+ t.string "marital_status", :limit => 1
1010
+ t.string "social_security_number"
1011
+ t.integer "current_passport_number"
1012
+ t.date "current_passport_expire_date"
1013
+ t.integer "total_years_work_experience"
1014
+ t.string "comments"
1015
+ t.string "encrypted_ssn"
1016
+ t.string "temp_ssn"
1017
+ t.string "salt"
1018
+ t.string "ssn_last_four"
1019
+ t.datetime "created_at", :null => false
1020
+ t.datetime "updated_at", :null => false
1021
+ end
1022
+
1023
+ add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
1024
+
1025
+ create_table "line_item_role_types", :force => true do |t|
1026
+ t.integer "parent_id"
1027
+ t.integer "lft"
1028
+ t.integer "rgt"
1029
+ t.string "description"
1030
+ t.string "comments"
1031
+ t.string "internal_identifier"
1032
+ t.string "external_identifier"
1033
+ t.string "external_id_source"
1034
+ t.datetime "created_at", :null => false
1035
+ t.datetime "updated_at", :null => false
1036
+ end
1037
+
1038
+ add_index "line_item_role_types", ["parent_id"], :name => "index_line_item_role_types_on_parent_id"
1039
+
1040
+ create_table "loyalty_program_codes", :force => true do |t|
1041
+ t.string "identifier"
1042
+ t.string "name"
1043
+ t.string "description"
1044
+ t.datetime "created_at", :null => false
1045
+ t.datetime "updated_at", :null => false
1046
+ end
1047
+
1048
+ create_table "money", :force => true do |t|
1049
+ t.string "description"
1050
+ t.decimal "amount", :precision => 8, :scale => 2
1051
+ t.integer "currency_id"
1052
+ t.datetime "created_at", :null => false
1053
+ t.datetime "updated_at", :null => false
1054
+ end
1055
+
1056
+ add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
1057
+
1058
+ create_table "note_types", :force => true do |t|
1059
+ t.integer "parent_id"
1060
+ t.integer "lft"
1061
+ t.integer "rgt"
1062
+ t.string "description"
1063
+ t.string "internal_identifier"
1064
+ t.string "external_identifier"
1065
+ t.integer "note_type_record_id"
1066
+ t.string "note_type_record_type"
1067
+ t.datetime "created_at", :null => false
1068
+ t.datetime "updated_at", :null => false
1069
+ end
1070
+
1071
+ add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
1072
+
1073
+ create_table "notes", :force => true do |t|
1074
+ t.integer "created_by_id"
1075
+ t.text "content"
1076
+ t.integer "noted_record_id"
1077
+ t.string "noted_record_type"
1078
+ t.integer "note_type_id"
1079
+ t.datetime "created_at", :null => false
1080
+ t.datetime "updated_at", :null => false
1081
+ end
1082
+
1083
+ add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
1084
+ add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
1085
+ add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
1086
+
1087
+ create_table "order_line_item_pty_roles", :force => true do |t|
1088
+ t.string "description"
1089
+ t.integer "order_line_item_id"
1090
+ t.integer "party_id"
1091
+ t.integer "line_item_role_type_id"
1092
+ t.integer "biz_txn_acct_root_id"
1093
+ t.datetime "created_at", :null => false
1094
+ t.datetime "updated_at", :null => false
1095
+ end
1096
+
1097
+ add_index "order_line_item_pty_roles", ["biz_txn_acct_root_id"], :name => "index_order_line_item_pty_roles_on_biz_txn_acct_root_id"
1098
+ add_index "order_line_item_pty_roles", ["line_item_role_type_id"], :name => "index_order_line_item_pty_roles_on_line_item_role_type_id"
1099
+ add_index "order_line_item_pty_roles", ["order_line_item_id"], :name => "index_order_line_item_pty_roles_on_order_line_item_id"
1100
+ add_index "order_line_item_pty_roles", ["party_id"], :name => "index_order_line_item_pty_roles_on_party_id"
1101
+
1102
+ create_table "order_line_item_types", :force => true do |t|
1103
+ t.integer "parent_id"
1104
+ t.integer "lft"
1105
+ t.integer "rgt"
1106
+ t.string "description"
1107
+ t.string "comments"
1108
+ t.string "internal_identifier"
1109
+ t.string "external_identifier"
1110
+ t.string "external_id_source"
1111
+ t.datetime "created_at", :null => false
1112
+ t.datetime "updated_at", :null => false
1113
+ end
1114
+
1115
+ add_index "order_line_item_types", ["parent_id"], :name => "index_order_line_item_types_on_parent_id"
1116
+
1117
+ create_table "order_line_items", :force => true do |t|
1118
+ t.integer "order_txn_id"
1119
+ t.integer "order_line_item_type_id"
1120
+ t.integer "product_id"
1121
+ t.string "product_description"
1122
+ t.integer "product_instance_id"
1123
+ t.string "product_instance_description"
1124
+ t.integer "product_type_id"
1125
+ t.string "product_type_description"
1126
+ t.decimal "sold_price", :precision => 8, :scale => 2
1127
+ t.integer "sold_price_uom"
1128
+ t.integer "sold_amount"
1129
+ t.integer "sold_amount_uom"
1130
+ t.integer "product_offer_id"
1131
+ t.datetime "created_at", :null => false
1132
+ t.datetime "updated_at", :null => false
1133
+ end
1134
+
1135
+ add_index "order_line_items", ["order_line_item_type_id"], :name => "index_order_line_items_on_order_line_item_type_id"
1136
+ add_index "order_line_items", ["order_txn_id"], :name => "index_order_line_items_on_order_txn_id"
1137
+ add_index "order_line_items", ["product_id"], :name => "index_order_line_items_on_product_id"
1138
+ add_index "order_line_items", ["product_instance_id"], :name => "index_order_line_items_on_product_instance_id"
1139
+ add_index "order_line_items", ["product_offer_id"], :name => "index_order_line_items_on_product_offer_id"
1140
+ add_index "order_line_items", ["product_type_id"], :name => "index_order_line_items_on_product_type_id"
1141
+
1142
+ create_table "order_txn_types", :force => true do |t|
1143
+ t.integer "parent_id"
1144
+ t.integer "lft"
1145
+ t.integer "rgt"
1146
+ t.string "description"
1147
+ t.string "comments"
1148
+ t.string "internal_identifier"
1149
+ t.string "external_identifier"
1150
+ t.string "external_id_source"
1151
+ t.datetime "created_at", :null => false
1152
+ t.datetime "updated_at", :null => false
1153
+ end
1154
+
1155
+ add_index "order_txn_types", ["parent_id"], :name => "index_order_txn_types_on_parent_id"
1156
+
1157
+ create_table "order_txns", :force => true do |t|
1158
+ t.string "state_machine"
1159
+ t.string "description"
1160
+ t.integer "order_txn_type_id"
1161
+ t.string "email"
1162
+ t.string "phone_number"
1163
+ t.string "ship_to_first_name"
1164
+ t.string "ship_to_last_name"
1165
+ t.string "ship_to_address_line_1"
1166
+ t.string "ship_to_address_line_2"
1167
+ t.string "bill_to_address_line_1"
1168
+ t.string "bill_to_address_line_2"
1169
+ t.string "ship_to_city"
1170
+ t.string "ship_to_state"
1171
+ t.string "ship_to_postal_code"
1172
+ t.string "ship_to_country_name"
1173
+ t.string "customer_ip"
1174
+ t.integer "order_number"
1175
+ t.string "status"
1176
+ t.string "error_message"
1177
+ t.integer "order_txn_record_id"
1178
+ t.string "order_txn_record_type"
1179
+ t.datetime "created_at", :null => false
1180
+ t.datetime "updated_at", :null => false
1181
+ t.string "payment_gateway_txn_id"
1182
+ t.integer "credit_card_id"
1183
+ t.string "bill_to_first_name"
1184
+ t.string "bill_to_last_name"
1185
+ t.string "bill_to_city"
1186
+ t.string "bill_to_state"
1187
+ t.string "bill_to_postal_code"
1188
+ t.string "bill_to_country_name"
1189
+ t.string "bill_to_country"
1190
+ t.string "ship_to_country"
1191
+ end
1192
+
1193
+ add_index "order_txns", ["order_txn_record_id", "order_txn_record_type"], :name => "order_txn_record_idx"
1194
+ add_index "order_txns", ["order_txn_type_id"], :name => "index_order_txns_on_order_txn_type_id"
1195
+
1196
+ create_table "organizations", :force => true do |t|
1197
+ t.string "description"
1198
+ t.string "tax_id_number"
1199
+ t.datetime "created_at", :null => false
1200
+ t.datetime "updated_at", :null => false
1201
+ end
1202
+
1203
+ create_table "parties", :force => true do |t|
1204
+ t.string "description"
1205
+ t.integer "business_party_id"
1206
+ t.string "business_party_type"
1207
+ t.integer "list_view_image_id"
1208
+ t.string "enterprise_identifier"
1209
+ t.datetime "created_at", :null => false
1210
+ t.datetime "updated_at", :null => false
1211
+ end
1212
+
1213
+ add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
1214
+
1215
+ create_table "party_relationships", :force => true do |t|
1216
+ t.string "description"
1217
+ t.integer "party_id_from"
1218
+ t.integer "party_id_to"
1219
+ t.integer "role_type_id_from"
1220
+ t.integer "role_type_id_to"
1221
+ t.integer "status_type_id"
1222
+ t.integer "priority_type_id"
1223
+ t.integer "relationship_type_id"
1224
+ t.date "from_date"
1225
+ t.date "thru_date"
1226
+ t.string "external_identifier"
1227
+ t.string "external_id_source"
1228
+ t.datetime "created_at", :null => false
1229
+ t.datetime "updated_at", :null => false
1230
+ end
1231
+
1232
+ add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
1233
+ add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
1234
+ add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
1235
+
1236
+ create_table "party_roles", :force => true do |t|
1237
+ t.string "type"
1238
+ t.integer "party_id"
1239
+ t.integer "role_type_id"
1240
+ t.datetime "created_at", :null => false
1241
+ t.datetime "updated_at", :null => false
1242
+ end
1243
+
1244
+ add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
1245
+ add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
1246
+
1247
+ create_table "party_search_facts", :force => true do |t|
1248
+ t.integer "party_id"
1249
+ t.string "eid"
1250
+ t.string "type"
1251
+ t.text "roles"
1252
+ t.string "party_description"
1253
+ t.string "party_business_party_type"
1254
+ t.string "user_login"
1255
+ t.string "individual_current_last_name"
1256
+ t.string "individual_current_first_name"
1257
+ t.string "individual_current_middle_name"
1258
+ t.string "individual_birth_date"
1259
+ t.string "individual_ssn"
1260
+ t.string "party_phone_number"
1261
+ t.string "party_email_address"
1262
+ t.string "party_address_1"
1263
+ t.string "party_address_2"
1264
+ t.string "party_primary_address_city"
1265
+ t.string "party_primary_address_state"
1266
+ t.string "party_primary_address_zip"
1267
+ t.string "party_primary_address_country"
1268
+ t.boolean "user_enabled"
1269
+ t.string "user_type"
1270
+ t.boolean "reindex"
1271
+ t.datetime "created_at", :null => false
1272
+ t.datetime "updated_at", :null => false
1273
+ end
1274
+
1275
+ create_table "payment_gateway_actions", :force => true do |t|
1276
+ t.string "internal_identifier"
1277
+ t.string "description"
1278
+ t.datetime "created_at", :null => false
1279
+ t.datetime "updated_at", :null => false
1280
+ end
1281
+
1282
+ add_index "payment_gateway_actions", ["internal_identifier"], :name => "index_payment_gateway_actions_on_internal_identifier"
1283
+
1284
+ create_table "payment_gateways", :force => true do |t|
1285
+ t.string "params"
1286
+ t.integer "payment_gateway_action_id"
1287
+ t.integer "payment_id"
1288
+ t.string "response"
1289
+ t.datetime "created_at", :null => false
1290
+ t.datetime "updated_at", :null => false
1291
+ end
1292
+
1293
+ create_table "payments", :force => true do |t|
1294
+ t.boolean "success"
1295
+ t.string "reference_number"
1296
+ t.integer "financial_txn_id"
1297
+ t.string "current_state"
1298
+ t.string "authorization_code"
1299
+ t.string "external_identifier"
1300
+ t.datetime "created_at", :null => false
1301
+ t.datetime "updated_at", :null => false
1302
+ end
1303
+
1304
+ add_index "payments", ["financial_txn_id"], :name => "index_payments_on_financial_txn_id"
1305
+
1306
+ create_table "phone_numbers", :force => true do |t|
1307
+ t.string "phone_number"
1308
+ t.string "description"
1309
+ t.datetime "created_at", :null => false
1310
+ t.datetime "updated_at", :null => false
1311
+ end
1312
+
1313
+ create_table "postal_addresses", :force => true do |t|
1314
+ t.string "address_line_1"
1315
+ t.string "address_line_2"
1316
+ t.string "city"
1317
+ t.string "state"
1318
+ t.string "zip"
1319
+ t.string "country"
1320
+ t.string "description"
1321
+ t.integer "geo_country_id"
1322
+ t.integer "geo_zone_id"
1323
+ t.datetime "created_at", :null => false
1324
+ t.datetime "updated_at", :null => false
1325
+ end
1326
+
1327
+ add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
1328
+ add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
1329
+
1330
+ create_table "preference_options", :force => true do |t|
1331
+ t.string "description"
1332
+ t.string "internal_identifier"
1333
+ t.string "value"
1334
+ t.datetime "created_at", :null => false
1335
+ t.datetime "updated_at", :null => false
1336
+ end
1337
+
1338
+ create_table "preference_options_preference_types", :id => false, :force => true do |t|
1339
+ t.integer "preference_type_id"
1340
+ t.integer "preference_option_id"
1341
+ end
1342
+
1343
+ add_index "preference_options_preference_types", ["preference_option_id"], :name => "pref_opt_pref_type_pref_opt_id_idx"
1344
+ add_index "preference_options_preference_types", ["preference_type_id"], :name => "pref_opt_pref_type_pref_type_id_idx"
1345
+
1346
+ create_table "preference_types", :force => true do |t|
1347
+ t.string "description"
1348
+ t.string "internal_identifier"
1349
+ t.integer "default_pref_option_id"
1350
+ t.datetime "created_at", :null => false
1351
+ t.datetime "updated_at", :null => false
1352
+ end
1353
+
1354
+ add_index "preference_types", ["default_pref_option_id"], :name => "index_preference_types_on_default_pref_option_id"
1355
+
1356
+ create_table "preferences", :force => true do |t|
1357
+ t.integer "preference_option_id"
1358
+ t.integer "preference_type_id"
1359
+ t.datetime "created_at", :null => false
1360
+ t.datetime "updated_at", :null => false
1361
+ end
1362
+
1363
+ add_index "preferences", ["preference_option_id"], :name => "index_preferences_on_preference_option_id"
1364
+ add_index "preferences", ["preference_type_id"], :name => "index_preferences_on_preference_type_id"
1365
+
1366
+ create_table "price_component_types", :force => true do |t|
1367
+ t.string "description"
1368
+ t.string "internal_identifier"
1369
+ t.string "external_identifier"
1370
+ t.string "external_id_source"
1371
+ t.datetime "created_at", :null => false
1372
+ t.datetime "updated_at", :null => false
1373
+ end
1374
+
1375
+ create_table "price_components", :force => true do |t|
1376
+ t.string "description"
1377
+ t.integer "pricing_plan_component_id"
1378
+ t.integer "price_id"
1379
+ t.integer "money_id"
1380
+ t.integer "priced_component_id"
1381
+ t.string "priced_component_type"
1382
+ t.datetime "created_at", :null => false
1383
+ t.datetime "updated_at", :null => false
1384
+ end
1385
+
1386
+ add_index "price_components", ["money_id"], :name => "index_price_components_on_money_id"
1387
+ add_index "price_components", ["price_id"], :name => "index_price_components_on_price_id"
1388
+ add_index "price_components", ["priced_component_id", "priced_component_type"], :name => "priced_component_idx"
1389
+ add_index "price_components", ["pricing_plan_component_id"], :name => "index_price_components_on_pricing_plan_component_id"
1390
+
1391
+ create_table "price_plan_comp_gl_accounts", :force => true do |t|
1392
+ t.integer "pricing_plan_component_id"
1393
+ t.integer "gl_account_id"
1394
+ t.string "mapping_rule_klass"
1395
+ t.datetime "created_at", :null => false
1396
+ t.datetime "updated_at", :null => false
1397
+ end
1398
+
1399
+ create_table "prices", :force => true do |t|
1400
+ t.string "description"
1401
+ t.integer "priced_item_id"
1402
+ t.string "priced_item_type"
1403
+ t.integer "pricing_plan_id"
1404
+ t.integer "money_id"
1405
+ t.datetime "created_at", :null => false
1406
+ t.datetime "updated_at", :null => false
1407
+ end
1408
+
1409
+ add_index "prices", ["money_id"], :name => "index_prices_on_money_id"
1410
+ add_index "prices", ["priced_item_id", "priced_item_type"], :name => "priced_item_idx"
1411
+ add_index "prices", ["pricing_plan_id"], :name => "index_prices_on_pricing_plan_id"
1412
+
1413
+ create_table "pricing_plan_assignments", :force => true do |t|
1414
+ t.integer "pricing_plan_id"
1415
+ t.integer "priceable_item_id"
1416
+ t.string "priceable_item_type"
1417
+ t.integer "priority"
1418
+ t.datetime "created_at", :null => false
1419
+ t.datetime "updated_at", :null => false
1420
+ end
1421
+
1422
+ add_index "pricing_plan_assignments", ["priceable_item_id", "priceable_item_type"], :name => "priceable_item_idx"
1423
+ add_index "pricing_plan_assignments", ["pricing_plan_id"], :name => "index_pricing_plan_assignments_on_pricing_plan_id"
1424
+
1425
+ create_table "pricing_plan_components", :force => true do |t|
1426
+ t.integer "price_component_type_id"
1427
+ t.string "description"
1428
+ t.string "comments"
1429
+ t.string "internal_identifier"
1430
+ t.string "external_identifier"
1431
+ t.string "external_id_source"
1432
+ t.string "matching_rules"
1433
+ t.string "pricing_calculation"
1434
+ t.boolean "is_simple_amount"
1435
+ t.integer "currency_id"
1436
+ t.decimal "money_amount", :precision => 8, :scale => 2
1437
+ t.datetime "created_at", :null => false
1438
+ t.datetime "updated_at", :null => false
1439
+ end
1440
+
1441
+ add_index "pricing_plan_components", ["price_component_type_id"], :name => "index_pricing_plan_components_on_price_component_type_id"
1442
+
1443
+ create_table "pricing_plans", :force => true do |t|
1444
+ t.string "description"
1445
+ t.string "comments"
1446
+ t.string "internal_identifier"
1447
+ t.string "external_identifier"
1448
+ t.string "external_id_source"
1449
+ t.date "from_date"
1450
+ t.date "thru_date"
1451
+ t.string "matching_rules"
1452
+ t.string "pricing_calculation"
1453
+ t.boolean "is_simple_amount"
1454
+ t.integer "currency_id"
1455
+ t.decimal "money_amount", :precision => 8, :scale => 2
1456
+ t.datetime "created_at", :null => false
1457
+ t.datetime "updated_at", :null => false
1458
+ end
1459
+
1460
+ create_table "prod_availability_status_types", :force => true do |t|
1461
+ t.integer "parent_id"
1462
+ t.integer "lft"
1463
+ t.integer "rgt"
1464
+ t.string "description"
1465
+ t.string "internal_identifier"
1466
+ t.string "external_identifier"
1467
+ t.string "external_id_source"
1468
+ t.datetime "created_at", :null => false
1469
+ t.datetime "updated_at", :null => false
1470
+ end
1471
+
1472
+ create_table "prod_instance_reln_types", :force => true do |t|
1473
+ t.integer "parent_id"
1474
+ t.integer "lft"
1475
+ t.integer "rgt"
1476
+ t.string "description"
1477
+ t.string "comments"
1478
+ t.string "internal_identifier"
1479
+ t.string "external_identifier"
1480
+ t.string "external_id_source"
1481
+ t.datetime "created_at", :null => false
1482
+ t.datetime "updated_at", :null => false
1483
+ end
1484
+
1485
+ add_index "prod_instance_reln_types", ["parent_id"], :name => "index_prod_instance_reln_types_on_parent_id"
1486
+
1487
+ create_table "prod_instance_relns", :force => true do |t|
1488
+ t.integer "prod_instance_reln_type_id"
1489
+ t.string "description"
1490
+ t.integer "prod_instance_id_from"
1491
+ t.integer "prod_instance_id_to"
1492
+ t.integer "role_type_id_from"
1493
+ t.integer "role_type_id_to"
1494
+ t.integer "status_type_id"
1495
+ t.date "from_date"
1496
+ t.date "thru_date"
1497
+ t.datetime "created_at", :null => false
1498
+ t.datetime "updated_at", :null => false
1499
+ end
1500
+
1501
+ add_index "prod_instance_relns", ["prod_instance_reln_type_id"], :name => "index_prod_instance_relns_on_prod_instance_reln_type_id"
1502
+ add_index "prod_instance_relns", ["status_type_id"], :name => "index_prod_instance_relns_on_status_type_id"
1503
+
1504
+ create_table "prod_instance_role_types", :force => true do |t|
1505
+ t.integer "parent_id"
1506
+ t.integer "lft"
1507
+ t.integer "rgt"
1508
+ t.string "description"
1509
+ t.string "comments"
1510
+ t.string "internal_identifier"
1511
+ t.string "external_identifier"
1512
+ t.string "external_id_source"
1513
+ t.datetime "created_at", :null => false
1514
+ t.datetime "updated_at", :null => false
1515
+ end
1516
+
1517
+ add_index "prod_instance_role_types", ["parent_id"], :name => "index_prod_instance_role_types_on_parent_id"
1518
+
1519
+ create_table "prod_type_reln_types", :force => true do |t|
1520
+ t.integer "parent_id"
1521
+ t.integer "lft"
1522
+ t.integer "rgt"
1523
+ t.string "description"
1524
+ t.string "comments"
1525
+ t.string "internal_identifier"
1526
+ t.string "external_identifier"
1527
+ t.string "external_id_source"
1528
+ t.datetime "created_at", :null => false
1529
+ t.datetime "updated_at", :null => false
1530
+ end
1531
+
1532
+ add_index "prod_type_reln_types", ["parent_id"], :name => "index_prod_type_reln_types_on_parent_id"
1533
+
1534
+ create_table "prod_type_relns", :force => true do |t|
1535
+ t.integer "prod_type_reln_type_id"
1536
+ t.string "description"
1537
+ t.integer "prod_type_id_from"
1538
+ t.integer "prod_type_id_to"
1539
+ t.integer "role_type_id_from"
1540
+ t.integer "role_type_id_to"
1541
+ t.integer "status_type_id"
1542
+ t.date "from_date"
1543
+ t.date "thru_date"
1544
+ t.datetime "created_at", :null => false
1545
+ t.datetime "updated_at", :null => false
1546
+ end
1547
+
1548
+ add_index "prod_type_relns", ["prod_type_reln_type_id"], :name => "index_prod_type_relns_on_prod_type_reln_type_id"
1549
+ add_index "prod_type_relns", ["status_type_id"], :name => "index_prod_type_relns_on_status_type_id"
1550
+
1551
+ create_table "prod_type_role_types", :force => true do |t|
1552
+ t.integer "parent_id"
1553
+ t.integer "lft"
1554
+ t.integer "rgt"
1555
+ t.string "description"
1556
+ t.string "comments"
1557
+ t.string "internal_identifier"
1558
+ t.string "external_identifier"
1559
+ t.string "external_id_source"
1560
+ t.datetime "created_at", :null => false
1561
+ t.datetime "updated_at", :null => false
1562
+ end
1563
+
1564
+ add_index "prod_type_role_types", ["parent_id"], :name => "index_prod_type_role_types_on_parent_id"
1565
+
1566
+ create_table "product_instance_status_types", :force => true do |t|
1567
+ t.integer "parent_id"
1568
+ t.integer "lft"
1569
+ t.integer "rgt"
1570
+ t.string "description"
1571
+ t.string "internal_identifier"
1572
+ t.string "external_identifier"
1573
+ t.string "external_id_source"
1574
+ t.datetime "created_at", :null => false
1575
+ t.datetime "updated_at", :null => false
1576
+ end
1577
+
1578
+ create_table "product_instances", :force => true do |t|
1579
+ t.integer "parent_id"
1580
+ t.integer "lft"
1581
+ t.integer "rgt"
1582
+ t.string "description"
1583
+ t.integer "product_instance_record_id"
1584
+ t.string "product_instance_record_type"
1585
+ t.string "external_identifier"
1586
+ t.string "external_id_source"
1587
+ t.integer "product_type_id"
1588
+ t.string "type"
1589
+ t.integer "prod_availability_status_type_id"
1590
+ t.datetime "created_at", :null => false
1591
+ t.datetime "updated_at", :null => false
1592
+ end
1593
+
1594
+ add_index "product_instances", ["parent_id"], :name => "index_product_instances_on_parent_id"
1595
+ add_index "product_instances", ["product_instance_record_id", "product_instance_record_type"], :name => "bpi_2"
1596
+ add_index "product_instances", ["product_type_id"], :name => "index_product_instances_on_product_type_id"
1597
+
1598
+ create_table "product_offers", :force => true do |t|
1599
+ t.string "description"
1600
+ t.integer "product_offer_record_id"
1601
+ t.string "product_offer_record_type"
1602
+ t.string "external_identifier"
1603
+ t.string "external_id_source"
1604
+ t.datetime "created_at", :null => false
1605
+ t.datetime "updated_at", :null => false
1606
+ end
1607
+
1608
+ add_index "product_offers", ["product_offer_record_id", "product_offer_record_type"], :name => "bpi_3"
1609
+
1610
+ create_table "product_types", :force => true do |t|
1611
+ t.integer "parent_id"
1612
+ t.integer "lft"
1613
+ t.integer "rgt"
1614
+ t.string "description"
1615
+ t.integer "product_type_record_id"
1616
+ t.string "product_type_record_type"
1617
+ t.string "external_identifier"
1618
+ t.string "internal_identifier"
1619
+ t.string "external_id_source"
1620
+ t.string "default_image_url"
1621
+ t.integer "list_view_image_id"
1622
+ t.datetime "created_at", :null => false
1623
+ t.datetime "updated_at", :null => false
1624
+ end
1625
+
1626
+ add_index "product_types", ["parent_id"], :name => "index_product_types_on_parent_id"
1627
+ add_index "product_types", ["product_type_record_id", "product_type_record_type"], :name => "bpi_1"
1628
+
1629
+ create_table "relationship_types", :force => true do |t|
1630
+ t.integer "parent_id"
1631
+ t.integer "lft"
1632
+ t.integer "rgt"
1633
+ t.integer "valid_from_role_type_id"
1634
+ t.integer "valid_to_role_type_id"
1635
+ t.string "name"
1636
+ t.string "description"
1637
+ t.string "internal_identifier"
1638
+ t.string "external_identifier"
1639
+ t.string "external_id_source"
1640
+ t.datetime "created_at", :null => false
1641
+ t.datetime "updated_at", :null => false
1642
+ end
1643
+
1644
+ add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
1645
+ add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
1646
+
1647
+ create_table "role_types", :force => true do |t|
1648
+ t.integer "parent_id"
1649
+ t.integer "lft"
1650
+ t.integer "rgt"
1651
+ t.string "description"
1652
+ t.string "comments"
1653
+ t.string "internal_identifier"
1654
+ t.string "external_identifier"
1655
+ t.string "external_id_source"
1656
+ t.datetime "created_at", :null => false
1657
+ t.datetime "updated_at", :null => false
1658
+ end
1659
+
1660
+ create_table "roles", :force => true do |t|
1661
+ t.string "description"
1662
+ t.string "internal_identifier"
1663
+ t.string "external_identifier"
1664
+ t.string "external_id_source"
1665
+ t.datetime "created_at", :null => false
1666
+ t.datetime "updated_at", :null => false
1667
+ end
1668
+
1669
+ create_table "roles_secured_models", :id => false, :force => true do |t|
1670
+ t.integer "secured_model_id"
1671
+ t.integer "role_id"
1672
+ end
1673
+
1674
+ add_index "roles_secured_models", ["role_id"], :name => "index_roles_secured_models_on_role_id"
1675
+ add_index "roles_secured_models", ["secured_model_id"], :name => "index_roles_secured_models_on_secured_model_id"
1676
+
1677
+ create_table "secured_models", :force => true do |t|
1678
+ t.integer "secured_record_id"
1679
+ t.string "secured_record_type"
1680
+ t.datetime "created_at", :null => false
1681
+ t.datetime "updated_at", :null => false
1682
+ end
1683
+
1684
+ add_index "secured_models", ["secured_record_id", "secured_record_type"], :name => "secured_record_idx"
1685
+
1686
+ create_table "sessions", :force => true do |t|
1687
+ t.string "session_id", :null => false
1688
+ t.text "data"
1689
+ t.datetime "created_at", :null => false
1690
+ t.datetime "updated_at", :null => false
1691
+ end
1692
+
1693
+ add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
1694
+ add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
1695
+
1696
+ create_table "simple_product_offers", :force => true do |t|
1697
+ t.string "description"
1698
+ t.integer "product_id"
1699
+ t.decimal "base_price", :precision => 8, :scale => 2
1700
+ t.integer "uom"
1701
+ t.datetime "created_at", :null => false
1702
+ t.datetime "updated_at", :null => false
1703
+ end
1704
+
1705
+ add_index "simple_product_offers", ["product_id"], :name => "index_simple_product_offers_on_product_id"
1706
+
1707
+ create_table "tree_menu_node_defs", :force => true do |t|
1708
+ t.string "node_type"
1709
+ t.integer "parent_id"
1710
+ t.integer "lft"
1711
+ t.integer "rgt"
1712
+ t.string "menu_short_name"
1713
+ t.string "menu_description"
1714
+ t.string "text"
1715
+ t.string "icon_url"
1716
+ t.string "target_url"
1717
+ t.string "resource_class"
1718
+ t.datetime "created_at", :null => false
1719
+ t.datetime "updated_at", :null => false
1720
+ end
1721
+
1722
+ add_index "tree_menu_node_defs", ["parent_id"], :name => "index_tree_menu_node_defs_on_parent_id"
1723
+
1724
+ create_table "user_preferences", :force => true do |t|
1725
+ t.integer "user_id"
1726
+ t.integer "preference_id"
1727
+ t.integer "preferenced_record_id"
1728
+ t.string "preferenced_record_type"
1729
+ t.datetime "created_at", :null => false
1730
+ t.datetime "updated_at", :null => false
1731
+ end
1732
+
1733
+ add_index "user_preferences", ["preference_id"], :name => "index_user_preferences_on_preference_id"
1734
+ add_index "user_preferences", ["preferenced_record_id"], :name => "index_user_preferences_on_preferenced_record_id"
1735
+ add_index "user_preferences", ["preferenced_record_type"], :name => "index_user_preferences_on_preferenced_record_type"
1736
+ add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
1737
+
1738
+ create_table "users", :force => true do |t|
1739
+ t.string "username"
1740
+ t.string "email"
1741
+ t.integer "party_id"
1742
+ t.string "type"
1743
+ t.string "salt"
1744
+ t.string "crypted_password"
1745
+ t.datetime "last_login_at"
1746
+ t.datetime "last_logout_at"
1747
+ t.datetime "last_activity_at"
1748
+ t.integer "failed_logins_count", :default => 0
1749
+ t.datetime "lock_expires_at"
1750
+ t.string "remember_me_token"
1751
+ t.datetime "remember_me_token_expires_at"
1752
+ t.string "reset_password_token"
1753
+ t.datetime "reset_password_token_expires_at"
1754
+ t.datetime "reset_password_email_sent_at"
1755
+ t.string "activation_state"
1756
+ t.string "activation_token"
1757
+ t.datetime "activation_token_expires_at"
1758
+ t.string "security_question_1"
1759
+ t.string "security_answer_1"
1760
+ t.string "security_question_2"
1761
+ t.string "security_answer_2"
1762
+ t.datetime "created_at", :null => false
1763
+ t.datetime "updated_at", :null => false
1764
+ end
1765
+
1766
+ add_index "users", ["activation_token"], :name => "index_users_on_activation_token"
1767
+ add_index "users", ["email"], :name => "index_users_on_email", :unique => true
1768
+ add_index "users", ["last_logout_at", "last_activity_at"], :name => "activity_idx"
1769
+ add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token"
1770
+ add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token"
1771
+ add_index "users", ["username"], :name => "index_users_on_username", :unique => true
1772
+
1773
+ create_table "valid_configurations", :force => true do |t|
1774
+ t.integer "configured_item_id"
1775
+ t.string "configured_item_type"
1776
+ t.integer "configuration_id"
1777
+ t.datetime "created_at", :null => false
1778
+ t.datetime "updated_at", :null => false
1779
+ end
1780
+
1781
+ add_index "valid_configurations", ["configuration_id"], :name => "index_valid_configurations_on_configuration_id"
1782
+ add_index "valid_configurations", ["configured_item_id", "configured_item_type"], :name => "configured_item_poly_idx"
1783
+
1784
+ create_table "valid_note_types", :force => true do |t|
1785
+ t.integer "valid_note_type_record_id"
1786
+ t.string "valid_note_type_record_type"
1787
+ t.integer "note_type_id"
1788
+ t.datetime "created_at", :null => false
1789
+ t.datetime "updated_at", :null => false
1790
+ end
1791
+
1792
+ add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
1793
+ add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
1794
+
1795
+ create_table "valid_preference_types", :force => true do |t|
1796
+ t.integer "preference_type_id"
1797
+ t.integer "preferenced_record_id"
1798
+ t.string "preferenced_record_type"
1799
+ end
1800
+
1801
+ create_table "valid_price_plan_components", :force => true do |t|
1802
+ t.integer "pricing_plan_id"
1803
+ t.integer "pricing_plan_component_id"
1804
+ t.datetime "created_at", :null => false
1805
+ t.datetime "updated_at", :null => false
1806
+ end
1807
+
1808
+ add_index "valid_price_plan_components", ["pricing_plan_component_id"], :name => "index_valid_price_plan_components_on_pricing_plan_component_id"
1809
+ add_index "valid_price_plan_components", ["pricing_plan_id"], :name => "index_valid_price_plan_components_on_pricing_plan_id"
1810
+
1811
+ create_table "view_types", :force => true do |t|
1812
+ t.string "internal_identifier"
1813
+ t.string "description"
1814
+ t.datetime "created_at", :null => false
1815
+ t.datetime "updated_at", :null => false
1816
+ end
1817
+
1818
+ create_table "widgets", :force => true do |t|
1819
+ t.string "description"
1820
+ t.string "internal_identifier"
1821
+ t.string "icon"
1822
+ t.string "xtype"
1823
+ t.datetime "created_at", :null => false
1824
+ t.datetime "updated_at", :null => false
1825
+ end
1826
+
1827
+ end