erp_invoicing 3.1.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +7 -0
  2. data/app/models/extensions/party.rb +15 -3
  3. data/app/models/invoice.rb +33 -1
  4. data/app/models/invoice_party_role.rb +16 -0
  5. data/app/models/payment_application.rb +17 -1
  6. data/lib/erp_invoicing/engine.rb +1 -1
  7. data/lib/erp_invoicing/version.rb +6 -2
  8. metadata +31 -234
  9. data/app/assets/javascripts/erp_invoicing/application.js +0 -9
  10. data/app/assets/stylesheets/erp_invoicing/application.css +0 -7
  11. data/app/controllers/erp_invoicing/erp_app/organizer/bill_pay/accounts_controller.rb +0 -166
  12. data/app/controllers/erp_invoicing/erp_app/organizer/bill_pay/base_controller.rb +0 -22
  13. data/app/controllers/erp_invoicing/erp_app/shared/billing_accounts_controller.rb +0 -111
  14. data/app/controllers/erp_invoicing/erp_app/shared/files_controller.rb +0 -52
  15. data/app/controllers/erp_invoicing/erp_app/shared/invoices_controller.rb +0 -208
  16. data/app/controllers/erp_invoicing/sms_controller.rb +0 -156
  17. data/app/helpers/erp_invoicing/application_helper.rb +0 -4
  18. data/app/views/layouts/erp_invoicing/application.html.erb +0 -14
  19. data/db/data_migrations/20111121153349_create_bill_pay_organizer_application.rb +0 -14
  20. data/db/data_migrations/20120118181839_create_invoice_management_desktop_application.rb +0 -26
  21. data/db/data_migrations/20120229174322_add_billpay_widget.rb +0 -26
  22. data/public/javascripts/erp_app/desktop/applications/invoice_management/billing_accounts_panel.js +0 -79
  23. data/public/javascripts/erp_app/desktop/applications/invoice_management/invoices_panel.js +0 -48
  24. data/public/javascripts/erp_app/desktop/applications/invoice_management/module.js +0 -36
  25. data/public/javascripts/erp_app/organizer/applications/bill_pay/base.js +0 -146
  26. data/public/javascripts/erp_app/organizer/applications/bill_pay/extensions.js +0 -21
  27. data/public/javascripts/erp_app/organizer/applications/bill_pay/make_payment_window.js +0 -109
  28. data/public/javascripts/erp_app/organizer/applications/bill_pay/payment_accounts_grid_panel.js +0 -105
  29. data/public/javascripts/erp_app/organizer/applications/bill_pay/transactions_grid_panel.js +0 -84
  30. data/public/javascripts/erp_app/shared/add_invoice_window.js +0 -220
  31. data/public/javascripts/erp_app/shared/billing_accounts_grid_panel.js +0 -316
  32. data/public/javascripts/erp_app/shared/invoice_items_grid_panel.js +0 -152
  33. data/public/javascripts/erp_app/shared/invoices_grid_panel.js +0 -361
  34. data/public/javascripts/erp_app/shared/payments_grid_panel.js +0 -74
  35. data/spec/dummy/db/data_migrations/20101011152441_payment_gateway_actions.erp_commerce.rb +0 -28
  36. data/spec/dummy/db/data_migrations/20101014142230_financial_txn_types.erp_txns_and_accts.rb +0 -16
  37. data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +0 -15
  38. data/spec/dummy/db/data_migrations/20110324010232_product_role_types.erp_products.rb +0 -24
  39. data/spec/dummy/db/data_migrations/20110509223702_add_publisher_role.knitkit.rb +0 -22
  40. data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +0 -12
  41. data/spec/dummy/db/data_migrations/20110527160807_add_default_prod_avail_types.erp_products.rb +0 -27
  42. data/spec/dummy/db/data_migrations/20110605231556_create_order_party_roles.erp_orders.rb +0 -24
  43. data/spec/dummy/db/data_migrations/20110608185830_create_default_dynamic_models_and_forms.erp_forms.rb +0 -33
  44. data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +0 -19
  45. data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +0 -252
  46. data/spec/dummy/db/data_migrations/20110728201730_create_desktop_app_product_manager.erp_products.rb +0 -26
  47. data/spec/dummy/db/data_migrations/20110728201731_create_desktop_app_order_manager.erp_orders.rb +0 -26
  48. data/spec/dummy/db/data_migrations/20110728201732_create_organizer_app_order_management.erp_orders.rb +0 -15
  49. data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +0 -53
  50. data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +0 -16
  51. data/spec/dummy/db/data_migrations/20110816153456_add_knitkit_application.knitkit.rb +0 -32
  52. data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +0 -21
  53. data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +0 -32
  54. data/spec/dummy/db/data_migrations/20110828190913_create_desktop_app_dynamic_forms.erp_forms.rb +0 -19
  55. data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +0 -12
  56. data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +0 -23
  57. data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +0 -42
  58. data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +0 -22
  59. data/spec/dummy/db/data_migrations/20111118182910_setup_knitkit_capabilities.knitkit.rb +0 -128
  60. data/spec/dummy/db/data_migrations/20111121153349_create_bill_pay_organizer_application.erp_invoicing.rb +0 -15
  61. data/spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb +0 -14
  62. data/spec/dummy/db/data_migrations/20120118181839_create_invoice_management_desktop_application.erp_invoicing.rb +0 -27
  63. data/spec/dummy/db/data_migrations/20120127144444_create_website_role_types.knitkit.rb +0 -14
  64. data/spec/dummy/db/data_migrations/20120127150505_create_website_default_configuration.knitkit.rb +0 -73
  65. data/spec/dummy/db/data_migrations/20120127150506_add_primary_host_to_website_configuration.knitkit.rb +0 -34
  66. data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +0 -29
  67. data/spec/dummy/db/data_migrations/20120229174322_add_billpay_widget.erp_invoicing.rb +0 -27
  68. data/spec/dummy/db/data_migrations/20120229174343_add_orders_widget.erp_orders.rb +0 -29
  69. data/spec/dummy/db/data_migrations/20120316150424_add_is_template_to_default_website_config.knitkit.rb +0 -17
  70. data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +0 -11
  71. data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +0 -19
  72. data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +0 -23
  73. data/spec/dummy/db/data_migrations/20120605154637_add_calculate_balance_strategy_types.erp_invoicing.rb +0 -21
  74. data/spec/dummy/db/data_migrations/20120809020508_update_website_and_configuration.knitkit.rb +0 -78
  75. data/spec/dummy/db/data_migrations/20120824013449_create_ticket_form.erp_forms.rb +0 -67
  76. data/spec/dummy/db/data_migrations/20121026013449_update_ticket_form.erp_forms.rb +0 -65
  77. data/spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb +0 -27
  78. data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +0 -20
  79. data/spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb +0 -21
  80. data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +0 -16
  81. data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +0 -24
  82. data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +0 -23
  83. data/spec/dummy/db/migrate/20121214000230_base_erp_services.erp_base_erp_svcs.rb +0 -461
  84. data/spec/dummy/db/migrate/20121214000231_base_tech_services.erp_tech_svcs.rb +0 -255
  85. data/spec/dummy/db/migrate/20121214000232_create_has_attribute_tables.erp_tech_svcs.rb +0 -39
  86. data/spec/dummy/db/migrate/20121214000233_base_app_framework.erp_app.rb +0 -276
  87. data/spec/dummy/db/migrate/20121214000234_dynamic_forms.erp_forms.rb +0 -95
  88. data/spec/dummy/db/migrate/20121214000235_create_tickets.erp_forms.rb +0 -19
  89. data/spec/dummy/db/migrate/20121214000236_upgrade_dynamic_forms_table.erp_forms.rb +0 -32
  90. data/spec/dummy/db/migrate/20121214000237_setup_knitkit.knitkit.rb +0 -316
  91. data/spec/dummy/db/migrate/20121214000238_invoicing_services.erp_invoicing.rb +0 -277
  92. data/spec/dummy/db/migrate/20121214000239_base_inventory.erp_inventory.rb +0 -91
  93. data/spec/dummy/db/migrate/20121214000240_base_inventory_indexes.erp_inventory.rb +0 -48
  94. data/spec/dummy/db/migrate/20121214000241_base_txns_and_accts.erp_txns_and_accts.rb +0 -364
  95. data/spec/dummy/db/migrate/20121214000242_agreements_services.erp_agreements.rb +0 -160
  96. data/spec/dummy/db/migrate/20121214000243_agreements_services_indexes.erp_agreements.rb +0 -52
  97. data/spec/dummy/db/migrate/20121214000244_base_orders.erp_orders.rb +0 -178
  98. data/spec/dummy/db/migrate/20121214000245_base_products.erp_products.rb +0 -234
  99. data/spec/dummy/db/migrate/20121214000246_base_products_indexes.erp_products.rb +0 -59
  100. data/spec/dummy/db/migrate/20121214000247_erp_commerce_base.erp_commerce.rb +0 -442
  101. data/spec/dummy/db/migrate/20121214000248_base_work_efforts.erp_work_effort.rb +0 -211
  102. data/spec/dummy/db/migrate/20130107181155_create_groups.erp_tech_svcs.rb +0 -19
  103. data/spec/dummy/db/migrate/20130107181156_upgrade_security.erp_tech_svcs.rb +0 -54
  104. data/spec/dummy/db/migrate/20130107181157_upgrade_security2.erp_tech_svcs.rb +0 -270
  105. data/spec/dummy/db/schema.rb +0 -2569
  106. data/spec/dummy/db/spec.sqlite3 +0 -0
  107. data/spec/dummy/log/spec.log +0 -64744
@@ -1,2569 +0,0 @@
1
- # encoding: UTF-8
2
- # This file is auto-generated from the current state of the database. Instead
3
- # of editing this file, please use the migrations feature of Active Record to
4
- # incrementally modify your database, and then regenerate this schema definition.
5
- #
6
- # Note that this schema.rb definition is the authoritative source for your
7
- # database schema. If you need to create the application database on another
8
- # system, you should be using db:schema:load, not running all the migrations
9
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
- # you'll amass, the slower it'll run and the greater likelihood for issues).
11
- #
12
- # It's strongly recommended to check this file into your version control system.
13
-
14
- ActiveRecord::Schema.define(:version => 20121214000248) 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 "billing_accounts", :force => true do |t|
292
- t.boolean "send_paper_bills", :default => false
293
- t.boolean "payable_online", :default => false
294
- t.date "billing_date"
295
- t.integer "calculate_balance_strategy_type_id"
296
- t.datetime "created_at", :null => false
297
- t.datetime "updated_at", :null => false
298
- end
299
-
300
- create_table "billing_contact_mechanisms", :force => true do |t|
301
- t.string "description"
302
- t.integer "contact_mechanism_id"
303
- t.string "contact_mechanism_type"
304
- t.datetime "created_at", :null => false
305
- t.datetime "updated_at", :null => false
306
- end
307
-
308
- add_index "billing_contact_mechanisms", ["contact_mechanism_id", "contact_mechanism_type"], :name => "billing_contact_mechanism_idx"
309
-
310
- create_table "biz_acct_txn_tasks", :force => true do |t|
311
- t.integer "biz_txn_task_id"
312
- t.integer "biz_txn_account_id"
313
- t.string "description"
314
- t.string "comments"
315
- t.datetime "entered_date"
316
- t.datetime "requested_date"
317
- t.datetime "created_at", :null => false
318
- t.datetime "updated_at", :null => false
319
- end
320
-
321
- add_index "biz_acct_txn_tasks", ["biz_txn_account_id"], :name => "index_biz_acct_txn_tasks_on_biz_txn_account_id"
322
- add_index "biz_acct_txn_tasks", ["biz_txn_task_id"], :name => "index_biz_acct_txn_tasks_on_biz_txn_task_id"
323
-
324
- create_table "biz_txn_acct_party_roles", :force => true do |t|
325
- t.string "description"
326
- t.integer "biz_txn_acct_root_id"
327
- t.integer "party_id"
328
- t.integer "biz_txn_acct_pty_rtype_id"
329
- t.integer "is_default_billing_acct_flag"
330
- t.datetime "created_at", :null => false
331
- t.datetime "updated_at", :null => false
332
- end
333
-
334
- 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"
335
- 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"
336
- add_index "biz_txn_acct_party_roles", ["party_id"], :name => "index_biz_txn_acct_party_roles_on_party_id"
337
-
338
- create_table "biz_txn_acct_pty_rtypes", :force => true do |t|
339
- t.integer "parent_id"
340
- t.integer "lft"
341
- t.integer "rgt"
342
- t.string "description"
343
- t.string "comments"
344
- t.string "internal_identifier"
345
- t.string "external_identifier"
346
- t.string "external_id_source"
347
- t.datetime "created_at", :null => false
348
- t.datetime "updated_at", :null => false
349
- end
350
-
351
- add_index "biz_txn_acct_pty_rtypes", ["parent_id"], :name => "index_biz_txn_acct_pty_rtypes_on_parent_id"
352
-
353
- create_table "biz_txn_acct_rel_types", :force => true do |t|
354
- t.integer "parent_id"
355
- t.integer "lft"
356
- t.integer "rgt"
357
- t.string "description"
358
- t.string "comments"
359
- t.string "internal_identifier"
360
- t.string "external_identifier"
361
- t.string "external_id_source"
362
- t.datetime "created_at", :null => false
363
- t.datetime "updated_at", :null => false
364
- end
365
-
366
- add_index "biz_txn_acct_rel_types", ["parent_id"], :name => "index_biz_txn_acct_rel_types_on_parent_id"
367
-
368
- create_table "biz_txn_acct_relationships", :force => true do |t|
369
- t.integer "biz_txn_acct_rel_type_id"
370
- t.string "description"
371
- t.integer "biz_txn_acct_root_id_from"
372
- t.integer "biz_txn_acct_root_id_to"
373
- t.integer "status_type_id"
374
- t.date "from_date"
375
- t.date "thru_date"
376
- t.datetime "created_at", :null => false
377
- t.datetime "updated_at", :null => false
378
- end
379
-
380
- 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"
381
- add_index "biz_txn_acct_relationships", ["status_type_id"], :name => "index_biz_txn_acct_relationships_on_status_type_id"
382
-
383
- create_table "biz_txn_acct_roots", :force => true do |t|
384
- t.string "description"
385
- t.integer "status"
386
- t.integer "biz_txn_acct_id"
387
- t.string "biz_txn_acct_type"
388
- t.string "external_identifier"
389
- t.string "external_id_source"
390
- t.string "type"
391
- t.datetime "created_at", :null => false
392
- t.datetime "updated_at", :null => false
393
- end
394
-
395
- add_index "biz_txn_acct_roots", ["biz_txn_acct_id", "biz_txn_acct_type"], :name => "btai_2"
396
-
397
- create_table "biz_txn_acct_status_types", :force => true do |t|
398
- t.datetime "created_at", :null => false
399
- t.datetime "updated_at", :null => false
400
- end
401
-
402
- create_table "biz_txn_acct_statuses", :force => true do |t|
403
- t.datetime "created_at", :null => false
404
- t.datetime "updated_at", :null => false
405
- end
406
-
407
- create_table "biz_txn_acct_types", :force => true do |t|
408
- t.integer "parent_id"
409
- t.integer "lft"
410
- t.integer "rgt"
411
- t.string "description"
412
- t.string "comments"
413
- t.string "internal_identifier"
414
- t.string "external_identifier"
415
- t.string "external_id_source"
416
- t.datetime "created_at", :null => false
417
- t.datetime "updated_at", :null => false
418
- end
419
-
420
- add_index "biz_txn_acct_types", ["parent_id"], :name => "index_biz_txn_acct_types_on_parent_id"
421
-
422
- create_table "biz_txn_agreement_role_types", :force => true do |t|
423
- t.integer "parent_id"
424
- t.integer "lft"
425
- t.integer "rgt"
426
- t.string "description"
427
- t.string "comments"
428
- t.string "internal_identifier"
429
- t.datetime "created_at", :null => false
430
- t.datetime "updated_at", :null => false
431
- end
432
-
433
- add_index "biz_txn_agreement_role_types", ["parent_id"], :name => "index_biz_txn_agreement_role_types_on_parent_id"
434
-
435
- create_table "biz_txn_agreement_roles", :force => true do |t|
436
- t.integer "biz_txn_event_id"
437
- t.string "biz_txn_event_type"
438
- t.integer "agreement_id"
439
- t.integer "biz_txn_agreement_role_type_id"
440
- t.datetime "created_at", :null => false
441
- t.datetime "updated_at", :null => false
442
- end
443
-
444
- add_index "biz_txn_agreement_roles", ["agreement_id"], :name => "index_biz_txn_agreement_roles_on_agreement_id"
445
- 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"
446
-
447
- create_table "biz_txn_event_descs", :force => true do |t|
448
- t.integer "biz_txn_event_id"
449
- t.integer "language_id"
450
- t.integer "locale_id"
451
- t.integer "priority"
452
- t.integer "sequence"
453
- t.string "short_description"
454
- t.string "long_description"
455
- t.datetime "created_at", :null => false
456
- t.datetime "updated_at", :null => false
457
- end
458
-
459
- add_index "biz_txn_event_descs", ["biz_txn_event_id"], :name => "index_biz_txn_event_descs_on_biz_txn_event_id"
460
- add_index "biz_txn_event_descs", ["language_id"], :name => "index_biz_txn_event_descs_on_language_id"
461
- add_index "biz_txn_event_descs", ["locale_id"], :name => "index_biz_txn_event_descs_on_locale_id"
462
-
463
- create_table "biz_txn_events", :force => true do |t|
464
- t.string "description"
465
- t.integer "biz_txn_acct_root_id"
466
- t.integer "biz_txn_type_id"
467
- t.datetime "entered_date"
468
- t.datetime "post_date"
469
- t.integer "biz_txn_record_id"
470
- t.string "biz_txn_record_type"
471
- t.string "external_identifier"
472
- t.string "external_id_source"
473
- t.datetime "created_at", :null => false
474
- t.datetime "updated_at", :null => false
475
- end
476
-
477
- add_index "biz_txn_events", ["biz_txn_acct_root_id"], :name => "index_biz_txn_events_on_biz_txn_acct_root_id"
478
- add_index "biz_txn_events", ["biz_txn_record_id", "biz_txn_record_type"], :name => "btai_1"
479
- add_index "biz_txn_events", ["biz_txn_type_id"], :name => "index_biz_txn_events_on_biz_txn_type_id"
480
-
481
- create_table "biz_txn_party_role_types", :force => true do |t|
482
- t.integer "parent_id"
483
- t.integer "lft"
484
- t.integer "rgt"
485
- t.string "description"
486
- t.string "comments"
487
- t.string "internal_identifier"
488
- t.datetime "created_at", :null => false
489
- t.datetime "updated_at", :null => false
490
- end
491
-
492
- add_index "biz_txn_party_role_types", ["parent_id"], :name => "index_biz_txn_party_role_types_on_parent_id"
493
-
494
- create_table "biz_txn_party_roles", :force => true do |t|
495
- t.integer "biz_txn_event_id"
496
- t.integer "party_id"
497
- t.integer "biz_txn_party_role_type_id"
498
- t.datetime "created_at", :null => false
499
- t.datetime "updated_at", :null => false
500
- end
501
-
502
- add_index "biz_txn_party_roles", ["biz_txn_event_id"], :name => "index_biz_txn_party_roles_on_biz_txn_event_id"
503
- 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"
504
- add_index "biz_txn_party_roles", ["party_id"], :name => "index_biz_txn_party_roles_on_party_id"
505
-
506
- create_table "biz_txn_rel_types", :force => true do |t|
507
- t.integer "parent_id"
508
- t.integer "lft"
509
- t.integer "rgt"
510
- t.string "description"
511
- t.string "comments"
512
- t.string "internal_identifier"
513
- t.string "external_identifier"
514
- t.string "external_id_source"
515
- t.datetime "created_at", :null => false
516
- t.datetime "updated_at", :null => false
517
- end
518
-
519
- add_index "biz_txn_rel_types", ["parent_id"], :name => "index_biz_txn_rel_types_on_parent_id"
520
-
521
- create_table "biz_txn_relationships", :force => true do |t|
522
- t.integer "biz_txn_rel_type_id"
523
- t.string "description"
524
- t.integer "txn_event_id_from"
525
- t.integer "txn_event_id_to"
526
- t.integer "status_type_id"
527
- t.date "from_date"
528
- t.date "thru_date"
529
- t.datetime "created_at", :null => false
530
- t.datetime "updated_at", :null => false
531
- end
532
-
533
- add_index "biz_txn_relationships", ["biz_txn_rel_type_id"], :name => "index_biz_txn_relationships_on_biz_txn_rel_type_id"
534
- add_index "biz_txn_relationships", ["status_type_id"], :name => "index_biz_txn_relationships_on_status_type_id"
535
-
536
- create_table "biz_txn_statuses", :force => true do |t|
537
- t.string "description"
538
- t.string "comments"
539
- t.datetime "created_at", :null => false
540
- t.datetime "updated_at", :null => false
541
- end
542
-
543
- create_table "biz_txn_task_types", :force => true do |t|
544
- t.integer "parent_id"
545
- t.integer "lft"
546
- t.integer "rgt"
547
- t.string "description"
548
- t.string "comments"
549
- t.datetime "created_at", :null => false
550
- t.datetime "updated_at", :null => false
551
- end
552
-
553
- add_index "biz_txn_task_types", ["parent_id"], :name => "index_biz_txn_task_types_on_parent_id"
554
-
555
- create_table "biz_txn_tasks", :force => true do |t|
556
- t.string "description"
557
- t.datetime "created_at", :null => false
558
- t.datetime "updated_at", :null => false
559
- end
560
-
561
- create_table "biz_txn_types", :force => true do |t|
562
- t.integer "parent_id"
563
- t.integer "lft"
564
- t.integer "rgt"
565
- t.string "description"
566
- t.string "comments"
567
- t.string "internal_identifier"
568
- t.string "external_identifier"
569
- t.string "external_id_source"
570
- t.datetime "created_at", :null => false
571
- t.datetime "updated_at", :null => false
572
- end
573
-
574
- add_index "biz_txn_types", ["parent_id", "lft", "rgt"], :name => "biz_txn_type_nested_set_idx"
575
-
576
- create_table "calculate_balance_strategy_types", :force => true do |t|
577
- t.string "internal_identifier"
578
- t.string "description"
579
- t.datetime "created_at", :null => false
580
- t.datetime "updated_at", :null => false
581
- end
582
-
583
- create_table "capabilities", :force => true do |t|
584
- t.string "resource"
585
- t.integer "capability_type_id"
586
- t.datetime "created_at", :null => false
587
- t.datetime "updated_at", :null => false
588
- end
589
-
590
- add_index "capabilities", ["capability_type_id"], :name => "index_capabilities_on_capability_type_id"
591
-
592
- create_table "capabilities_capable_models", :id => false, :force => true do |t|
593
- t.integer "capable_model_id"
594
- t.integer "capability_id"
595
- end
596
-
597
- add_index "capabilities_capable_models", ["capability_id"], :name => "index_capabilities_capable_models_on_capability_id"
598
- add_index "capabilities_capable_models", ["capable_model_id"], :name => "index_capabilities_capable_models_on_capable_model_id"
599
-
600
- create_table "capability_types", :force => true do |t|
601
- t.string "internal_identifier"
602
- t.string "description"
603
- t.datetime "created_at", :null => false
604
- t.datetime "updated_at", :null => false
605
- end
606
-
607
- create_table "capable_models", :force => true do |t|
608
- t.integer "capable_model_record_id"
609
- t.string "capable_model_record_type"
610
- t.datetime "created_at", :null => false
611
- t.datetime "updated_at", :null => false
612
- end
613
-
614
- add_index "capable_models", ["capable_model_record_id", "capable_model_record_type"], :name => "capable_model_record_idx"
615
-
616
- create_table "categories", :force => true do |t|
617
- t.string "description"
618
- t.string "external_identifier"
619
- t.datetime "from_date"
620
- t.datetime "to_date"
621
- t.string "internal_identifier"
622
- t.integer "category_record_id"
623
- t.string "category_record_type"
624
- t.integer "parent_id"
625
- t.integer "lft"
626
- t.integer "rgt"
627
- t.datetime "created_at", :null => false
628
- t.datetime "updated_at", :null => false
629
- end
630
-
631
- add_index "categories", ["category_record_id", "category_record_type"], :name => "category_polymorphic"
632
-
633
- create_table "category_classifications", :force => true do |t|
634
- t.integer "category_id"
635
- t.string "classification_type"
636
- t.integer "classification_id"
637
- t.datetime "from_date"
638
- t.datetime "to_date"
639
- t.datetime "created_at", :null => false
640
- t.datetime "updated_at", :null => false
641
- end
642
-
643
- add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
644
-
645
- create_table "charge_line_payment_txns", :force => true do |t|
646
- t.integer "charge_line_id"
647
- t.integer "payment_txn_id"
648
- t.string "payment_txn_type"
649
- t.datetime "created_at", :null => false
650
- t.datetime "updated_at", :null => false
651
- end
652
-
653
- add_index "charge_line_payment_txns", ["charge_line_id"], :name => "index_charge_line_payment_txns_on_charge_line_id"
654
- add_index "charge_line_payment_txns", ["payment_txn_id", "payment_txn_type"], :name => "payment_txn_idx"
655
-
656
- create_table "charge_lines", :force => true do |t|
657
- t.string "sti_type"
658
- t.integer "money_id"
659
- t.string "description"
660
- t.string "external_identifier"
661
- t.string "external_id_source"
662
- t.integer "charged_item_id"
663
- t.string "charged_item_type"
664
- t.datetime "created_at", :null => false
665
- t.datetime "updated_at", :null => false
666
- end
667
-
668
- add_index "charge_lines", ["charged_item_id", "charged_item_type"], :name => "charged_item_idx"
669
-
670
- create_table "comments", :force => true do |t|
671
- t.string "commentor_name"
672
- t.string "email"
673
- t.text "comment"
674
- t.integer "approved"
675
- t.datetime "approved_at"
676
- t.integer "user_id"
677
- t.integer "commented_record_id"
678
- t.string "commented_record_type"
679
- t.datetime "created_at", :null => false
680
- t.datetime "updated_at", :null => false
681
- end
682
-
683
- add_index "comments", ["approved"], :name => "index_comments_on_approved"
684
- add_index "comments", ["commented_record_id", "commented_record_type"], :name => "commented_record_idx"
685
- add_index "comments", ["user_id"], :name => "index_comments_on_user_id"
686
-
687
- create_table "compass_ae_instances", :force => true do |t|
688
- t.decimal "version", :precision => 3, :scale => 8
689
- t.datetime "created_at", :null => false
690
- t.datetime "updated_at", :null => false
691
- end
692
-
693
- create_table "configuration_item_types", :force => true do |t|
694
- t.integer "parent_id"
695
- t.integer "lft"
696
- t.integer "rgt"
697
- t.string "description"
698
- t.string "internal_identifier"
699
- t.boolean "allow_user_defined_options", :default => false
700
- t.boolean "is_multi_optional", :default => false
701
- t.datetime "created_at", :null => false
702
- t.datetime "updated_at", :null => false
703
- end
704
-
705
- create_table "configuration_item_types_configuration_options", :force => true do |t|
706
- t.integer "configuration_item_type_id"
707
- t.integer "configuration_option_id"
708
- t.boolean "is_default", :default => false
709
- t.datetime "created_at", :null => false
710
- t.datetime "updated_at", :null => false
711
- end
712
-
713
- add_index "configuration_item_types_configuration_options", ["configuration_item_type_id"], :name => "conf_item_type_conf_opt_id_item_idx"
714
- add_index "configuration_item_types_configuration_options", ["configuration_option_id"], :name => "conf_item_type_conf_opt_id_opt_idx"
715
-
716
- create_table "configuration_item_types_configurations", :id => false, :force => true do |t|
717
- t.integer "configuration_item_type_id"
718
- t.integer "configuration_id"
719
- end
720
-
721
- add_index "configuration_item_types_configurations", ["configuration_id"], :name => "conf_id_idx"
722
- add_index "configuration_item_types_configurations", ["configuration_item_type_id", "configuration_id"], :name => "conf_config_type_uniq_idx", :unique => true
723
- add_index "configuration_item_types_configurations", ["configuration_item_type_id"], :name => "conf_conf_type_id_item_idx"
724
-
725
- create_table "configuration_items", :force => true do |t|
726
- t.integer "configuration_id"
727
- t.integer "configuration_item_type_id"
728
- t.integer "configuration_option_id"
729
- t.datetime "created_at", :null => false
730
- t.datetime "updated_at", :null => false
731
- end
732
-
733
- add_index "configuration_items", ["configuration_id"], :name => "index_configuration_items_on_configuration_id"
734
- add_index "configuration_items", ["configuration_item_type_id"], :name => "index_configuration_items_on_configuration_item_type_id"
735
- add_index "configuration_items", ["configuration_option_id"], :name => "index_configuration_items_on_configuration_option_id"
736
-
737
- create_table "configuration_items_configuration_options", :id => false, :force => true do |t|
738
- t.integer "configuration_item_id"
739
- t.integer "configuration_option_id"
740
- end
741
-
742
- add_index "configuration_items_configuration_options", ["configuration_item_id"], :name => "conf_item_conf_opt_id_item_idx"
743
- add_index "configuration_items_configuration_options", ["configuration_option_id"], :name => "conf_item_conf_opt_id_opt_idx"
744
-
745
- create_table "configuration_options", :force => true do |t|
746
- t.string "description"
747
- t.string "internal_identifier"
748
- t.string "value"
749
- t.text "comment"
750
- t.boolean "user_defined", :default => false
751
- t.datetime "created_at", :null => false
752
- t.datetime "updated_at", :null => false
753
- end
754
-
755
- add_index "configuration_options", ["internal_identifier"], :name => "index_configuration_options_on_internal_identifier"
756
- add_index "configuration_options", ["user_defined"], :name => "index_configuration_options_on_user_defined"
757
- add_index "configuration_options", ["value"], :name => "index_configuration_options_on_value"
758
-
759
- create_table "configurations", :force => true do |t|
760
- t.string "description"
761
- t.string "internal_identifier"
762
- t.boolean "active"
763
- t.boolean "is_template", :default => false
764
- t.datetime "created_at", :null => false
765
- t.datetime "updated_at", :null => false
766
- end
767
-
768
- add_index "configurations", ["is_template"], :name => "index_configurations_on_is_template"
769
-
770
- create_table "contact_purposes", :force => true do |t|
771
- t.integer "parent_id"
772
- t.integer "lft"
773
- t.integer "rgt"
774
- t.string "description"
775
- t.string "comments"
776
- t.string "internal_identifier"
777
- t.string "external_identifier"
778
- t.string "external_id_source"
779
- t.datetime "created_at", :null => false
780
- t.datetime "updated_at", :null => false
781
- end
782
-
783
- add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
784
-
785
- create_table "contact_purposes_contacts", :id => false, :force => true do |t|
786
- t.integer "contact_id"
787
- t.integer "contact_purpose_id"
788
- end
789
-
790
- add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
791
-
792
- create_table "contact_types", :force => true do |t|
793
- t.integer "parent_id"
794
- t.integer "lft"
795
- t.integer "rgt"
796
- t.string "description"
797
- t.string "comments"
798
- t.string "internal_identifier"
799
- t.string "external_identifier"
800
- t.string "external_id_source"
801
- t.datetime "created_at", :null => false
802
- t.datetime "updated_at", :null => false
803
- end
804
-
805
- add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
806
-
807
- create_table "contacts", :force => true do |t|
808
- t.integer "party_id"
809
- t.integer "contact_mechanism_id"
810
- t.string "contact_mechanism_type"
811
- t.string "external_identifier"
812
- t.string "external_id_source"
813
- t.datetime "created_at", :null => false
814
- t.datetime "updated_at", :null => false
815
- end
816
-
817
- add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
818
- add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
819
-
820
- create_table "content_versions", :force => true do |t|
821
- t.integer "content_id"
822
- t.integer "version"
823
- t.string "title"
824
- t.string "permalink"
825
- t.text "excerpt_html"
826
- t.text "body_html"
827
- t.integer "created_by_id"
828
- t.integer "updated_by_id"
829
- t.string "internal_identifier"
830
- t.boolean "display_title"
831
- t.datetime "created_at"
832
- t.datetime "updated_at"
833
- t.string "versioned_type"
834
- end
835
-
836
- add_index "content_versions", ["content_id"], :name => "index_content_versions_on_content_id"
837
-
838
- create_table "contents", :force => true do |t|
839
- t.string "type"
840
- t.string "title"
841
- t.string "permalink"
842
- t.text "excerpt_html"
843
- t.text "body_html"
844
- t.integer "created_by_id"
845
- t.integer "updated_by_id"
846
- t.string "internal_identifier"
847
- t.boolean "display_title"
848
- t.integer "version"
849
- t.datetime "created_at", :null => false
850
- t.datetime "updated_at", :null => false
851
- end
852
-
853
- add_index "contents", ["created_by_id"], :name => "index_contents_on_created_by_id"
854
- add_index "contents", ["internal_identifier"], :name => "contents_iid_idx"
855
- add_index "contents", ["permalink"], :name => "index_contents_on_permalink"
856
- add_index "contents", ["type"], :name => "index_contents_on_type"
857
- add_index "contents", ["updated_by_id"], :name => "index_contents_on_updated_by_id"
858
- add_index "contents", ["version"], :name => "index_contents_on_version"
859
-
860
- create_table "costs", :force => true do |t|
861
- t.integer "money_id"
862
- t.datetime "created_at", :null => false
863
- t.datetime "updated_at", :null => false
864
- end
865
-
866
- create_table "credit_card_account_party_roles", :force => true do |t|
867
- t.integer "credit_card_account_id"
868
- t.integer "role_type_id"
869
- t.integer "party_id"
870
- t.integer "credit_card_id"
871
- t.datetime "created_at", :null => false
872
- t.datetime "updated_at", :null => false
873
- end
874
-
875
- add_index "credit_card_account_party_roles", ["credit_card_account_id"], :name => "index_credit_card_account_party_roles_on_credit_card_account_id"
876
- add_index "credit_card_account_party_roles", ["credit_card_id"], :name => "index_credit_card_account_party_roles_on_credit_card_id"
877
- add_index "credit_card_account_party_roles", ["party_id"], :name => "index_credit_card_account_party_roles_on_party_id"
878
- add_index "credit_card_account_party_roles", ["role_type_id"], :name => "index_credit_card_account_party_roles_on_role_type_id"
879
-
880
- create_table "credit_card_account_purposes", :force => true do |t|
881
- t.integer "parent_id"
882
- t.integer "lft"
883
- t.integer "rgt"
884
- t.string "description"
885
- t.string "comments"
886
- t.string "internal_identifier"
887
- t.string "external_identifier"
888
- t.string "external_id_source"
889
- t.datetime "created_at", :null => false
890
- t.datetime "updated_at", :null => false
891
- end
892
-
893
- create_table "credit_card_accounts", :force => true do |t|
894
- t.datetime "created_at", :null => false
895
- t.datetime "updated_at", :null => false
896
- end
897
-
898
- create_table "credit_cards", :force => true do |t|
899
- t.string "crypted_private_card_number"
900
- t.integer "expiration_month"
901
- t.integer "expiration_year"
902
- t.string "description"
903
- t.string "first_name_on_card"
904
- t.string "last_name_on_card"
905
- t.string "card_type"
906
- t.integer "postal_address_id"
907
- t.integer "credit_card_account_purpose_id"
908
- t.string "credit_card_token"
909
- t.datetime "created_at", :null => false
910
- t.datetime "updated_at", :null => false
911
- end
912
-
913
- create_table "currencies", :force => true do |t|
914
- t.string "name"
915
- t.string "definition"
916
- t.string "internal_identifier"
917
- t.string "numeric_code"
918
- t.string "major_unit_symbol"
919
- t.string "minor_unit_symbol"
920
- t.string "ratio_of_minor_unit_to_major_unit"
921
- t.string "postfix_label"
922
- t.datetime "introduction_date"
923
- t.datetime "expiration_date"
924
- t.datetime "created_at", :null => false
925
- t.datetime "updated_at", :null => false
926
- end
927
-
928
- add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
929
-
930
- create_table "delayed_jobs", :force => true do |t|
931
- t.integer "priority", :default => 0
932
- t.integer "attempts", :default => 0
933
- t.text "handler"
934
- t.text "last_error"
935
- t.datetime "run_at"
936
- t.datetime "locked_at"
937
- t.datetime "failed_at"
938
- t.string "locked_by"
939
- t.string "queue"
940
- t.datetime "created_at", :null => false
941
- t.datetime "updated_at", :null => false
942
- end
943
-
944
- add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
945
-
946
- create_table "descriptive_assets", :force => true do |t|
947
- t.integer "view_type_id"
948
- t.string "internal_identifier"
949
- t.text "description"
950
- t.string "external_identifier"
951
- t.string "external_id_source"
952
- t.integer "described_record_id"
953
- t.string "described_record_type"
954
- t.datetime "created_at", :null => false
955
- t.datetime "updated_at", :null => false
956
- end
957
-
958
- add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
959
- add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
960
-
961
- create_table "document_types", :force => true do |t|
962
- t.string "external_identifier"
963
- t.string "internal_identifier"
964
- t.string "description"
965
- t.datetime "created_at", :null => false
966
- t.datetime "updated_at", :null => false
967
- end
968
-
969
- create_table "documented_items", :force => true do |t|
970
- t.string "documented_klass"
971
- t.integer "documented_content_id"
972
- t.integer "online_document_section_id"
973
- t.datetime "created_at", :null => false
974
- t.datetime "updated_at", :null => false
975
- end
976
-
977
- create_table "documents", :force => true do |t|
978
- t.string "external_identifier"
979
- t.string "internal_identifier"
980
- t.string "description"
981
- t.datetime "document_date"
982
- t.text "dynamic_attributes"
983
- t.integer "document_record_id"
984
- t.string "document_record_type"
985
- t.integer "document_type_id"
986
- t.datetime "created_at", :null => false
987
- t.datetime "updated_at", :null => false
988
- end
989
-
990
- add_index "documents", ["document_record_type", "document_record_id"], :name => "document_record_poly_idx"
991
- add_index "documents", ["document_type_id"], :name => "document_type_idx"
992
-
993
- create_table "dynamic_data", :force => true do |t|
994
- t.string "reference_type"
995
- t.integer "reference_id"
996
- t.text "dynamic_attributes"
997
- t.integer "created_with_form_id"
998
- t.integer "updated_with_form_id"
999
- t.integer "created_by_id"
1000
- t.integer "updated_by_id"
1001
- t.datetime "created_at", :null => false
1002
- t.datetime "updated_at", :null => false
1003
- end
1004
-
1005
- add_index "dynamic_data", ["created_by_id"], :name => "index_dynamic_data_on_created_by_id"
1006
- add_index "dynamic_data", ["created_with_form_id"], :name => "index_dynamic_data_on_created_with_form_id"
1007
- add_index "dynamic_data", ["reference_id"], :name => "index_dynamic_data_on_reference_id"
1008
- add_index "dynamic_data", ["reference_type"], :name => "index_dynamic_data_on_reference_type"
1009
- add_index "dynamic_data", ["updated_by_id"], :name => "index_dynamic_data_on_updated_by_id"
1010
- add_index "dynamic_data", ["updated_with_form_id"], :name => "index_dynamic_data_on_updated_with_form_id"
1011
-
1012
- create_table "dynamic_form_documents", :force => true do |t|
1013
- t.integer "dynamic_form_model_id"
1014
- t.string "type"
1015
- t.datetime "created_at", :null => false
1016
- t.datetime "updated_at", :null => false
1017
- end
1018
-
1019
- add_index "dynamic_form_documents", ["dynamic_form_model_id"], :name => "index_dynamic_form_documents_on_dynamic_form_model_id"
1020
- add_index "dynamic_form_documents", ["type"], :name => "index_dynamic_form_documents_on_type"
1021
-
1022
- create_table "dynamic_form_models", :force => true do |t|
1023
- t.string "model_name"
1024
- t.boolean "show_in_multitask", :default => false
1025
- t.boolean "allow_comments", :default => true
1026
- t.boolean "allow_files", :default => true
1027
- t.string "file_security_default", :default => "private"
1028
- t.datetime "created_at", :null => false
1029
- t.datetime "updated_at", :null => false
1030
- end
1031
-
1032
- create_table "dynamic_forms", :force => true do |t|
1033
- t.string "description"
1034
- t.text "definition"
1035
- t.integer "dynamic_form_model_id"
1036
- t.string "model_name"
1037
- t.string "internal_identifier"
1038
- t.boolean "default"
1039
- t.string "widget_action", :default => "save"
1040
- t.string "widget_email_recipients"
1041
- t.boolean "focus_first_field", :default => true
1042
- t.boolean "submit_empty_text", :default => false
1043
- t.string "msg_target", :default => "qtip"
1044
- t.string "submit_button_label", :default => "Submit"
1045
- t.string "cancel_button_label", :default => "Cancel"
1046
- t.text "comment"
1047
- t.integer "created_by_id"
1048
- t.integer "updated_by_id"
1049
- t.datetime "created_at", :null => false
1050
- t.datetime "updated_at", :null => false
1051
- end
1052
-
1053
- add_index "dynamic_forms", ["created_by_id"], :name => "index_dynamic_forms_on_created_by_id"
1054
- add_index "dynamic_forms", ["dynamic_form_model_id"], :name => "index_dynamic_forms_on_dynamic_form_model_id"
1055
- add_index "dynamic_forms", ["internal_identifier"], :name => "index_dynamic_forms_on_internal_identifier"
1056
- add_index "dynamic_forms", ["model_name"], :name => "index_dynamic_forms_on_model_name"
1057
- add_index "dynamic_forms", ["updated_by_id"], :name => "index_dynamic_forms_on_updated_by_id"
1058
-
1059
- create_table "email_addresses", :force => true do |t|
1060
- t.string "email_address"
1061
- t.string "description"
1062
- t.datetime "created_at", :null => false
1063
- t.datetime "updated_at", :null => false
1064
- end
1065
-
1066
- create_table "fee_types", :force => true do |t|
1067
- t.string "internal_identifier"
1068
- t.string "description"
1069
- t.string "comments"
1070
- t.string "external_identifier"
1071
- t.string "external_id_source"
1072
- t.integer "parent_id"
1073
- t.integer "lft"
1074
- t.integer "rgt"
1075
- t.datetime "created_at", :null => false
1076
- t.datetime "updated_at", :null => false
1077
- end
1078
-
1079
- create_table "fees", :force => true do |t|
1080
- t.integer "fee_record_id"
1081
- t.string "fee_record_type"
1082
- t.integer "money_id"
1083
- t.integer "fee_type_id"
1084
- t.string "description"
1085
- t.datetime "start_date"
1086
- t.datetime "end_date"
1087
- t.string "external_identifier"
1088
- t.string "external_id_source"
1089
- t.datetime "created_at", :null => false
1090
- t.datetime "updated_at", :null => false
1091
- end
1092
-
1093
- add_index "fees", ["fee_record_id", "fee_record_type"], :name => "fee_record_idx"
1094
- add_index "fees", ["fee_type_id"], :name => "index_fees_on_fee_type_id"
1095
- add_index "fees", ["money_id"], :name => "index_fees_on_money_id"
1096
-
1097
- create_table "file_assets", :force => true do |t|
1098
- t.integer "file_asset_holder_id"
1099
- t.string "file_asset_holder_type"
1100
- t.string "type"
1101
- t.string "name"
1102
- t.string "directory"
1103
- t.string "data_file_name"
1104
- t.string "data_content_type"
1105
- t.integer "data_file_size"
1106
- t.datetime "data_updated_at"
1107
- t.string "width"
1108
- t.string "height"
1109
- t.datetime "created_at", :null => false
1110
- t.datetime "updated_at", :null => false
1111
- end
1112
-
1113
- add_index "file_assets", ["directory"], :name => "index_file_assets_on_directory"
1114
- add_index "file_assets", ["file_asset_holder_id", "file_asset_holder_type"], :name => "file_asset_holder_idx"
1115
- add_index "file_assets", ["name"], :name => "index_file_assets_on_name"
1116
- add_index "file_assets", ["type"], :name => "index_file_assets_on_type"
1117
-
1118
- create_table "financial_txn_accounts", :force => true do |t|
1119
- t.string "account_number"
1120
- t.integer "agreement_id"
1121
- t.integer "balance_id"
1122
- t.date "balance_date"
1123
- t.boolean "calculate_balance"
1124
- t.integer "payment_due_id"
1125
- t.date "due_date"
1126
- t.integer "financial_account_id"
1127
- t.string "financial_account_type"
1128
- t.datetime "created_at", :null => false
1129
- t.datetime "updated_at", :null => false
1130
- end
1131
-
1132
- create_table "financial_txn_assns", :force => true do |t|
1133
- t.integer "financial_txn_id"
1134
- t.integer "financial_txn_record_id"
1135
- t.string "financial_txn_record_type"
1136
- t.datetime "created_at", :null => false
1137
- t.datetime "updated_at", :null => false
1138
- end
1139
-
1140
- create_table "financial_txns", :force => true do |t|
1141
- t.integer "money_id"
1142
- t.date "apply_date"
1143
- t.datetime "created_at", :null => false
1144
- t.datetime "updated_at", :null => false
1145
- end
1146
-
1147
- create_table "geo_countries", :force => true do |t|
1148
- t.string "name"
1149
- t.string "iso_code_2"
1150
- t.string "iso_code_3"
1151
- t.boolean "display", :default => true
1152
- t.integer "external_id"
1153
- t.datetime "created_at"
1154
- end
1155
-
1156
- add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
1157
- add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
1158
-
1159
- create_table "geo_zones", :force => true do |t|
1160
- t.integer "geo_country_id"
1161
- t.string "zone_code", :default => "2"
1162
- t.string "zone_name"
1163
- t.datetime "created_at"
1164
- end
1165
-
1166
- add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
1167
- add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
1168
- add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
1169
-
1170
- create_table "individuals", :force => true do |t|
1171
- t.integer "party_id"
1172
- t.string "current_last_name"
1173
- t.string "current_first_name"
1174
- t.string "current_middle_name"
1175
- t.string "current_personal_title"
1176
- t.string "current_suffix"
1177
- t.string "current_nickname"
1178
- t.string "gender", :limit => 1
1179
- t.date "birth_date"
1180
- t.decimal "height", :precision => 5, :scale => 2
1181
- t.integer "weight"
1182
- t.string "mothers_maiden_name"
1183
- t.string "marital_status", :limit => 1
1184
- t.string "social_security_number"
1185
- t.integer "current_passport_number"
1186
- t.date "current_passport_expire_date"
1187
- t.integer "total_years_work_experience"
1188
- t.string "comments"
1189
- t.string "encrypted_ssn"
1190
- t.string "temp_ssn"
1191
- t.string "salt"
1192
- t.string "ssn_last_four"
1193
- t.datetime "created_at", :null => false
1194
- t.datetime "updated_at", :null => false
1195
- end
1196
-
1197
- add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
1198
-
1199
- create_table "inv_entry_reln_types", :force => true do |t|
1200
- t.integer "parent_id"
1201
- t.integer "lft"
1202
- t.integer "rgt"
1203
- t.string "description"
1204
- t.string "comments"
1205
- t.string "internal_identifier"
1206
- t.string "external_identifier"
1207
- t.string "external_id_source"
1208
- t.datetime "created_at", :null => false
1209
- t.datetime "updated_at", :null => false
1210
- end
1211
-
1212
- add_index "inv_entry_reln_types", ["parent_id"], :name => "index_inv_entry_reln_types_on_parent_id"
1213
-
1214
- create_table "inv_entry_relns", :force => true do |t|
1215
- t.integer "inv_entry_reln_type_id"
1216
- t.string "description"
1217
- t.integer "inv_entry_id_from"
1218
- t.integer "inv_entry_id_to"
1219
- t.integer "role_type_id_from"
1220
- t.integer "role_type_id_to"
1221
- t.integer "status_type_id"
1222
- t.date "from_date"
1223
- t.date "thru_date"
1224
- t.datetime "created_at", :null => false
1225
- t.datetime "updated_at", :null => false
1226
- end
1227
-
1228
- add_index "inv_entry_relns", ["inv_entry_reln_type_id"], :name => "index_inv_entry_relns_on_inv_entry_reln_type_id"
1229
- add_index "inv_entry_relns", ["status_type_id"], :name => "index_inv_entry_relns_on_status_type_id"
1230
-
1231
- create_table "inv_entry_role_types", :force => true do |t|
1232
- t.integer "parent_id"
1233
- t.integer "lft"
1234
- t.integer "rgt"
1235
- t.string "description"
1236
- t.string "comments"
1237
- t.string "internal_identifier"
1238
- t.string "external_identifier"
1239
- t.string "external_id_source"
1240
- t.datetime "created_at", :null => false
1241
- t.datetime "updated_at", :null => false
1242
- end
1243
-
1244
- add_index "inv_entry_role_types", ["parent_id"], :name => "index_inv_entry_role_types_on_parent_id"
1245
-
1246
- create_table "inventory_entries", :force => true do |t|
1247
- t.string "description"
1248
- t.integer "inventory_entry_record_id"
1249
- t.string "inventory_entry_record_type"
1250
- t.string "external_identifier"
1251
- t.string "external_id_source"
1252
- t.integer "product_type_id"
1253
- t.integer "number_available"
1254
- t.string "sku"
1255
- t.integer "number_sold"
1256
- t.datetime "created_at", :null => false
1257
- t.datetime "updated_at", :null => false
1258
- end
1259
-
1260
- add_index "inventory_entries", ["inventory_entry_record_id", "inventory_entry_record_type"], :name => "bii_1"
1261
-
1262
- create_table "invoice_item_types", :force => true do |t|
1263
- t.integer "parent_id"
1264
- t.integer "lft"
1265
- t.integer "rgt"
1266
- t.string "description"
1267
- t.string "comments"
1268
- t.string "internal_identifier"
1269
- t.string "external_identifier"
1270
- t.string "external_id_source"
1271
- t.datetime "created_at", :null => false
1272
- t.datetime "updated_at", :null => false
1273
- end
1274
-
1275
- create_table "invoice_items", :force => true do |t|
1276
- t.integer "invoice_id"
1277
- t.integer "invoice_item_type_id"
1278
- t.integer "invoiceable_item_id"
1279
- t.string "invoiceable_item_type"
1280
- t.integer "item_seq_id"
1281
- t.string "item_description"
1282
- t.decimal "sales_tax", :precision => 8, :scale => 2
1283
- t.decimal "quantity", :precision => 8, :scale => 2
1284
- t.decimal "amount", :precision => 8, :scale => 2
1285
- t.datetime "created_at", :null => false
1286
- t.datetime "updated_at", :null => false
1287
- end
1288
-
1289
- add_index "invoice_items", ["invoice_id"], :name => "invoice_id_idx"
1290
- add_index "invoice_items", ["invoice_item_type_id"], :name => "invoice_item_type_id_idx"
1291
- add_index "invoice_items", ["invoiceable_item_id", "invoiceable_item_type"], :name => "invoiceable_item_idx"
1292
-
1293
- create_table "invoice_party_roles", :force => true do |t|
1294
- t.string "description"
1295
- t.integer "role_type_id"
1296
- t.string "external_identifier"
1297
- t.string "external_id_source"
1298
- t.integer "invoice_id"
1299
- t.integer "party_id"
1300
- t.datetime "created_at", :null => false
1301
- t.datetime "updated_at", :null => false
1302
- end
1303
-
1304
- add_index "invoice_party_roles", ["invoice_id"], :name => "invoice_party_invoice_id_idx"
1305
- add_index "invoice_party_roles", ["party_id"], :name => "invoice_party_party_id_idx"
1306
-
1307
- create_table "invoice_payment_strategy_types", :force => true do |t|
1308
- t.string "description"
1309
- t.string "internal_identifier"
1310
- t.string "external_identifier"
1311
- t.string "external_id_source"
1312
- t.datetime "created_at", :null => false
1313
- t.datetime "updated_at", :null => false
1314
- end
1315
-
1316
- create_table "invoice_payment_term_sets", :force => true do |t|
1317
- t.integer "invoice_id"
1318
- t.integer "invoice_item_id"
1319
- t.string "description"
1320
- t.string "comments"
1321
- t.string "internal_identifier"
1322
- t.string "external_identifier"
1323
- t.string "external_id_source"
1324
- t.datetime "created_at", :null => false
1325
- t.datetime "updated_at", :null => false
1326
- end
1327
-
1328
- add_index "invoice_payment_term_sets", ["invoice_id"], :name => "index_invoice_payment_term_sets_on_invoice_id"
1329
- add_index "invoice_payment_term_sets", ["invoice_item_id"], :name => "index_invoice_payment_term_sets_on_invoice_item_id"
1330
-
1331
- create_table "invoice_payment_term_types", :force => true do |t|
1332
- t.integer "parent_id"
1333
- t.integer "lft"
1334
- t.integer "rgt"
1335
- t.string "description"
1336
- t.string "comments"
1337
- t.string "internal_identifier"
1338
- t.string "external_identifier"
1339
- t.string "external_id_source"
1340
- t.datetime "created_at", :null => false
1341
- t.datetime "updated_at", :null => false
1342
- end
1343
-
1344
- create_table "invoice_payment_terms", :force => true do |t|
1345
- t.integer "invoice_payment_term_type_id"
1346
- t.integer "invoice_payment_term_set_id"
1347
- t.string "description"
1348
- t.date "pay_by"
1349
- t.decimal "amount", :precision => 8, :scale => 2
1350
- t.datetime "created_at", :null => false
1351
- t.datetime "updated_at", :null => false
1352
- end
1353
-
1354
- add_index "invoice_payment_terms", ["invoice_payment_term_set_id"], :name => "index_invoice_payment_terms_on_invoice_payment_term_set_id"
1355
- add_index "invoice_payment_terms", ["invoice_payment_term_type_id"], :name => "index_invoice_payment_terms_on_invoice_payment_term_type_id"
1356
-
1357
- create_table "invoice_types", :force => true do |t|
1358
- t.integer "parent_id"
1359
- t.integer "lft"
1360
- t.integer "rgt"
1361
- t.string "description"
1362
- t.string "comments"
1363
- t.string "internal_identifier"
1364
- t.string "external_identifier"
1365
- t.string "external_id_source"
1366
- t.datetime "created_at", :null => false
1367
- t.datetime "updated_at", :null => false
1368
- end
1369
-
1370
- create_table "invoices", :force => true do |t|
1371
- t.string "invoice_number"
1372
- t.string "description"
1373
- t.string "message"
1374
- t.date "invoice_date"
1375
- t.date "due_date"
1376
- t.string "external_identifier"
1377
- t.string "external_id_source"
1378
- t.integer "product_id"
1379
- t.integer "invoice_type_id"
1380
- t.integer "billing_account_id"
1381
- t.integer "invoice_payment_strategy_type_id"
1382
- t.integer "balance_id"
1383
- t.integer "calculate_balance_strategy_type_id"
1384
- t.datetime "created_at", :null => false
1385
- t.datetime "updated_at", :null => false
1386
- end
1387
-
1388
- add_index "invoices", ["billing_account_id"], :name => "invoice_billing_acct_idx"
1389
- add_index "invoices", ["invoice_payment_strategy_type_id"], :name => "invoice_payment_stragegy_idx"
1390
- add_index "invoices", ["invoice_type_id"], :name => "invoice_type_idx"
1391
- add_index "invoices", ["product_id"], :name => "prod_type_idx"
1392
-
1393
- create_table "line_item_role_types", :force => true do |t|
1394
- t.integer "parent_id"
1395
- t.integer "lft"
1396
- t.integer "rgt"
1397
- t.string "description"
1398
- t.string "comments"
1399
- t.string "internal_identifier"
1400
- t.string "external_identifier"
1401
- t.string "external_id_source"
1402
- t.datetime "created_at", :null => false
1403
- t.datetime "updated_at", :null => false
1404
- end
1405
-
1406
- add_index "line_item_role_types", ["parent_id"], :name => "index_line_item_role_types_on_parent_id"
1407
-
1408
- create_table "loyalty_program_codes", :force => true do |t|
1409
- t.string "identifier"
1410
- t.string "name"
1411
- t.string "description"
1412
- t.datetime "created_at", :null => false
1413
- t.datetime "updated_at", :null => false
1414
- end
1415
-
1416
- create_table "money", :force => true do |t|
1417
- t.string "description"
1418
- t.decimal "amount", :precision => 8, :scale => 2
1419
- t.integer "currency_id"
1420
- t.datetime "created_at", :null => false
1421
- t.datetime "updated_at", :null => false
1422
- end
1423
-
1424
- add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
1425
-
1426
- create_table "note_types", :force => true do |t|
1427
- t.integer "parent_id"
1428
- t.integer "lft"
1429
- t.integer "rgt"
1430
- t.string "description"
1431
- t.string "internal_identifier"
1432
- t.string "external_identifier"
1433
- t.integer "note_type_record_id"
1434
- t.string "note_type_record_type"
1435
- t.datetime "created_at", :null => false
1436
- t.datetime "updated_at", :null => false
1437
- end
1438
-
1439
- add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
1440
-
1441
- create_table "notes", :force => true do |t|
1442
- t.integer "created_by_id"
1443
- t.text "content"
1444
- t.integer "noted_record_id"
1445
- t.string "noted_record_type"
1446
- t.integer "note_type_id"
1447
- t.datetime "created_at", :null => false
1448
- t.datetime "updated_at", :null => false
1449
- end
1450
-
1451
- add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
1452
- add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
1453
- add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
1454
-
1455
- create_table "order_line_item_pty_roles", :force => true do |t|
1456
- t.string "description"
1457
- t.integer "order_line_item_id"
1458
- t.integer "party_id"
1459
- t.integer "line_item_role_type_id"
1460
- t.integer "biz_txn_acct_root_id"
1461
- t.datetime "created_at", :null => false
1462
- t.datetime "updated_at", :null => false
1463
- end
1464
-
1465
- 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"
1466
- 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"
1467
- add_index "order_line_item_pty_roles", ["order_line_item_id"], :name => "index_order_line_item_pty_roles_on_order_line_item_id"
1468
- add_index "order_line_item_pty_roles", ["party_id"], :name => "index_order_line_item_pty_roles_on_party_id"
1469
-
1470
- create_table "order_line_item_types", :force => true do |t|
1471
- t.integer "parent_id"
1472
- t.integer "lft"
1473
- t.integer "rgt"
1474
- t.string "description"
1475
- t.string "comments"
1476
- t.string "internal_identifier"
1477
- t.string "external_identifier"
1478
- t.string "external_id_source"
1479
- t.datetime "created_at", :null => false
1480
- t.datetime "updated_at", :null => false
1481
- end
1482
-
1483
- add_index "order_line_item_types", ["parent_id"], :name => "index_order_line_item_types_on_parent_id"
1484
-
1485
- create_table "order_line_items", :force => true do |t|
1486
- t.integer "order_txn_id"
1487
- t.integer "order_line_item_type_id"
1488
- t.integer "product_id"
1489
- t.string "product_description"
1490
- t.integer "product_instance_id"
1491
- t.string "product_instance_description"
1492
- t.integer "product_type_id"
1493
- t.string "product_type_description"
1494
- t.decimal "sold_price", :precision => 8, :scale => 2
1495
- t.integer "sold_price_uom"
1496
- t.integer "sold_amount"
1497
- t.integer "sold_amount_uom"
1498
- t.integer "product_offer_id"
1499
- t.datetime "created_at", :null => false
1500
- t.datetime "updated_at", :null => false
1501
- end
1502
-
1503
- add_index "order_line_items", ["order_line_item_type_id"], :name => "index_order_line_items_on_order_line_item_type_id"
1504
- add_index "order_line_items", ["order_txn_id"], :name => "index_order_line_items_on_order_txn_id"
1505
- add_index "order_line_items", ["product_id"], :name => "index_order_line_items_on_product_id"
1506
- add_index "order_line_items", ["product_instance_id"], :name => "index_order_line_items_on_product_instance_id"
1507
- add_index "order_line_items", ["product_offer_id"], :name => "index_order_line_items_on_product_offer_id"
1508
- add_index "order_line_items", ["product_type_id"], :name => "index_order_line_items_on_product_type_id"
1509
-
1510
- create_table "order_txn_types", :force => true do |t|
1511
- t.integer "parent_id"
1512
- t.integer "lft"
1513
- t.integer "rgt"
1514
- t.string "description"
1515
- t.string "comments"
1516
- t.string "internal_identifier"
1517
- t.string "external_identifier"
1518
- t.string "external_id_source"
1519
- t.datetime "created_at", :null => false
1520
- t.datetime "updated_at", :null => false
1521
- end
1522
-
1523
- add_index "order_txn_types", ["parent_id"], :name => "index_order_txn_types_on_parent_id"
1524
-
1525
- create_table "order_txns", :force => true do |t|
1526
- t.string "state_machine"
1527
- t.string "description"
1528
- t.integer "order_txn_type_id"
1529
- t.string "email"
1530
- t.string "phone_number"
1531
- t.string "ship_to_first_name"
1532
- t.string "ship_to_last_name"
1533
- t.string "ship_to_address_line_1"
1534
- t.string "ship_to_address_line_2"
1535
- t.string "bill_to_address_line_1"
1536
- t.string "bill_to_address_line_2"
1537
- t.string "ship_to_city"
1538
- t.string "ship_to_state"
1539
- t.string "ship_to_postal_code"
1540
- t.string "ship_to_country_name"
1541
- t.string "customer_ip"
1542
- t.integer "order_number"
1543
- t.string "status"
1544
- t.string "error_message"
1545
- t.integer "order_txn_record_id"
1546
- t.string "order_txn_record_type"
1547
- t.datetime "created_at", :null => false
1548
- t.datetime "updated_at", :null => false
1549
- t.string "payment_gateway_txn_id"
1550
- t.integer "credit_card_id"
1551
- t.string "bill_to_first_name"
1552
- t.string "bill_to_last_name"
1553
- t.string "bill_to_city"
1554
- t.string "bill_to_state"
1555
- t.string "bill_to_postal_code"
1556
- t.string "bill_to_country_name"
1557
- t.string "bill_to_country"
1558
- t.string "ship_to_country"
1559
- end
1560
-
1561
- add_index "order_txns", ["order_txn_record_id", "order_txn_record_type"], :name => "order_txn_record_idx"
1562
- add_index "order_txns", ["order_txn_type_id"], :name => "index_order_txns_on_order_txn_type_id"
1563
-
1564
- create_table "organizations", :force => true do |t|
1565
- t.string "description"
1566
- t.string "tax_id_number"
1567
- t.datetime "created_at", :null => false
1568
- t.datetime "updated_at", :null => false
1569
- end
1570
-
1571
- create_table "parties", :force => true do |t|
1572
- t.string "description"
1573
- t.integer "business_party_id"
1574
- t.string "business_party_type"
1575
- t.integer "list_view_image_id"
1576
- t.string "enterprise_identifier"
1577
- t.datetime "created_at", :null => false
1578
- t.datetime "updated_at", :null => false
1579
- end
1580
-
1581
- add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
1582
-
1583
- create_table "party_relationships", :force => true do |t|
1584
- t.string "description"
1585
- t.integer "party_id_from"
1586
- t.integer "party_id_to"
1587
- t.integer "role_type_id_from"
1588
- t.integer "role_type_id_to"
1589
- t.integer "status_type_id"
1590
- t.integer "priority_type_id"
1591
- t.integer "relationship_type_id"
1592
- t.date "from_date"
1593
- t.date "thru_date"
1594
- t.string "external_identifier"
1595
- t.string "external_id_source"
1596
- t.datetime "created_at", :null => false
1597
- t.datetime "updated_at", :null => false
1598
- end
1599
-
1600
- add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
1601
- add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
1602
- add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
1603
-
1604
- create_table "party_resource_availabilities", :force => true do |t|
1605
- t.datetime "from_date"
1606
- t.datetime "to_date"
1607
- t.integer "party_id"
1608
- t.integer "pra_type_id"
1609
- t.datetime "created_at", :null => false
1610
- t.datetime "updated_at", :null => false
1611
- end
1612
-
1613
- add_index "party_resource_availabilities", ["from_date"], :name => "index_party_resource_availabilities_on_from_date"
1614
- add_index "party_resource_availabilities", ["party_id"], :name => "index_party_resource_availabilities_on_party_id"
1615
- add_index "party_resource_availabilities", ["pra_type_id"], :name => "index_party_resource_availabilities_on_pra_type_id"
1616
- add_index "party_resource_availabilities", ["to_date"], :name => "index_party_resource_availabilities_on_to_date"
1617
-
1618
- create_table "party_resource_availability_types", :force => true do |t|
1619
- t.string "description"
1620
- t.string "internal_identifier"
1621
- t.datetime "created_at", :null => false
1622
- t.datetime "updated_at", :null => false
1623
- end
1624
-
1625
- add_index "party_resource_availability_types", ["description"], :name => "index_party_resource_availability_types_on_description"
1626
- add_index "party_resource_availability_types", ["internal_identifier"], :name => "index_party_resource_availability_types_on_internal_identifier"
1627
-
1628
- create_table "party_roles", :force => true do |t|
1629
- t.string "type"
1630
- t.integer "party_id"
1631
- t.integer "role_type_id"
1632
- t.datetime "created_at", :null => false
1633
- t.datetime "updated_at", :null => false
1634
- end
1635
-
1636
- add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
1637
- add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
1638
-
1639
- create_table "party_search_facts", :force => true do |t|
1640
- t.integer "party_id"
1641
- t.string "eid"
1642
- t.string "type"
1643
- t.text "roles"
1644
- t.string "party_description"
1645
- t.string "party_business_party_type"
1646
- t.string "user_login"
1647
- t.string "individual_current_last_name"
1648
- t.string "individual_current_first_name"
1649
- t.string "individual_current_middle_name"
1650
- t.string "individual_birth_date"
1651
- t.string "individual_ssn"
1652
- t.string "party_phone_number"
1653
- t.string "party_email_address"
1654
- t.string "party_address_1"
1655
- t.string "party_address_2"
1656
- t.string "party_primary_address_city"
1657
- t.string "party_primary_address_state"
1658
- t.string "party_primary_address_zip"
1659
- t.string "party_primary_address_country"
1660
- t.boolean "user_enabled"
1661
- t.string "user_type"
1662
- t.boolean "reindex"
1663
- t.datetime "created_at", :null => false
1664
- t.datetime "updated_at", :null => false
1665
- end
1666
-
1667
- create_table "payment_applications", :force => true do |t|
1668
- t.integer "financial_txn_id"
1669
- t.integer "payment_applied_to_id"
1670
- t.string "payment_applied_to_type"
1671
- t.integer "applied_money_amount_id"
1672
- t.string "comment"
1673
- t.datetime "created_at", :null => false
1674
- t.datetime "updated_at", :null => false
1675
- end
1676
-
1677
- add_index "payment_applications", ["applied_money_amount_id"], :name => "index_payment_applications_on_applied_money_amount_id"
1678
- add_index "payment_applications", ["financial_txn_id"], :name => "index_payment_applications_on_financial_txn_id"
1679
- add_index "payment_applications", ["payment_applied_to_id", "payment_applied_to_type"], :name => "payment_applied_to_idx"
1680
-
1681
- create_table "payment_gateway_actions", :force => true do |t|
1682
- t.string "internal_identifier"
1683
- t.string "description"
1684
- t.datetime "created_at", :null => false
1685
- t.datetime "updated_at", :null => false
1686
- end
1687
-
1688
- add_index "payment_gateway_actions", ["internal_identifier"], :name => "index_payment_gateway_actions_on_internal_identifier"
1689
-
1690
- create_table "payment_gateways", :force => true do |t|
1691
- t.string "params"
1692
- t.integer "payment_gateway_action_id"
1693
- t.integer "payment_id"
1694
- t.string "response"
1695
- t.datetime "created_at", :null => false
1696
- t.datetime "updated_at", :null => false
1697
- end
1698
-
1699
- create_table "payments", :force => true do |t|
1700
- t.boolean "success"
1701
- t.string "reference_number"
1702
- t.integer "financial_txn_id"
1703
- t.string "current_state"
1704
- t.string "authorization_code"
1705
- t.string "external_identifier"
1706
- t.datetime "created_at", :null => false
1707
- t.datetime "updated_at", :null => false
1708
- end
1709
-
1710
- add_index "payments", ["financial_txn_id"], :name => "index_payments_on_financial_txn_id"
1711
-
1712
- create_table "phone_numbers", :force => true do |t|
1713
- t.string "phone_number"
1714
- t.string "description"
1715
- t.datetime "created_at", :null => false
1716
- t.datetime "updated_at", :null => false
1717
- end
1718
-
1719
- create_table "postal_addresses", :force => true do |t|
1720
- t.string "address_line_1"
1721
- t.string "address_line_2"
1722
- t.string "city"
1723
- t.string "state"
1724
- t.string "zip"
1725
- t.string "country"
1726
- t.string "description"
1727
- t.integer "geo_country_id"
1728
- t.integer "geo_zone_id"
1729
- t.datetime "created_at", :null => false
1730
- t.datetime "updated_at", :null => false
1731
- end
1732
-
1733
- add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
1734
- add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
1735
-
1736
- create_table "preference_options", :force => true do |t|
1737
- t.string "description"
1738
- t.string "internal_identifier"
1739
- t.string "value"
1740
- t.datetime "created_at", :null => false
1741
- t.datetime "updated_at", :null => false
1742
- end
1743
-
1744
- create_table "preference_options_preference_types", :id => false, :force => true do |t|
1745
- t.integer "preference_type_id"
1746
- t.integer "preference_option_id"
1747
- end
1748
-
1749
- add_index "preference_options_preference_types", ["preference_option_id"], :name => "pref_opt_pref_type_pref_opt_id_idx"
1750
- add_index "preference_options_preference_types", ["preference_type_id"], :name => "pref_opt_pref_type_pref_type_id_idx"
1751
-
1752
- create_table "preference_types", :force => true do |t|
1753
- t.string "description"
1754
- t.string "internal_identifier"
1755
- t.integer "default_pref_option_id"
1756
- t.datetime "created_at", :null => false
1757
- t.datetime "updated_at", :null => false
1758
- end
1759
-
1760
- add_index "preference_types", ["default_pref_option_id"], :name => "index_preference_types_on_default_pref_option_id"
1761
-
1762
- create_table "preferences", :force => true do |t|
1763
- t.integer "preference_option_id"
1764
- t.integer "preference_type_id"
1765
- t.datetime "created_at", :null => false
1766
- t.datetime "updated_at", :null => false
1767
- end
1768
-
1769
- add_index "preferences", ["preference_option_id"], :name => "index_preferences_on_preference_option_id"
1770
- add_index "preferences", ["preference_type_id"], :name => "index_preferences_on_preference_type_id"
1771
-
1772
- create_table "price_component_types", :force => true do |t|
1773
- t.string "description"
1774
- t.string "internal_identifier"
1775
- t.string "external_identifier"
1776
- t.string "external_id_source"
1777
- t.datetime "created_at", :null => false
1778
- t.datetime "updated_at", :null => false
1779
- end
1780
-
1781
- create_table "price_components", :force => true do |t|
1782
- t.string "description"
1783
- t.integer "pricing_plan_component_id"
1784
- t.integer "price_id"
1785
- t.integer "money_id"
1786
- t.integer "priced_component_id"
1787
- t.string "priced_component_type"
1788
- t.datetime "created_at", :null => false
1789
- t.datetime "updated_at", :null => false
1790
- end
1791
-
1792
- add_index "price_components", ["money_id"], :name => "index_price_components_on_money_id"
1793
- add_index "price_components", ["price_id"], :name => "index_price_components_on_price_id"
1794
- add_index "price_components", ["priced_component_id", "priced_component_type"], :name => "priced_component_idx"
1795
- add_index "price_components", ["pricing_plan_component_id"], :name => "index_price_components_on_pricing_plan_component_id"
1796
-
1797
- create_table "prices", :force => true do |t|
1798
- t.string "description"
1799
- t.integer "priced_item_id"
1800
- t.string "priced_item_type"
1801
- t.integer "pricing_plan_id"
1802
- t.integer "money_id"
1803
- t.datetime "created_at", :null => false
1804
- t.datetime "updated_at", :null => false
1805
- end
1806
-
1807
- add_index "prices", ["money_id"], :name => "index_prices_on_money_id"
1808
- add_index "prices", ["priced_item_id", "priced_item_type"], :name => "priced_item_idx"
1809
- add_index "prices", ["pricing_plan_id"], :name => "index_prices_on_pricing_plan_id"
1810
-
1811
- create_table "pricing_plan_assignments", :force => true do |t|
1812
- t.integer "pricing_plan_id"
1813
- t.integer "priceable_item_id"
1814
- t.string "priceable_item_type"
1815
- t.integer "priority"
1816
- t.datetime "created_at", :null => false
1817
- t.datetime "updated_at", :null => false
1818
- end
1819
-
1820
- add_index "pricing_plan_assignments", ["priceable_item_id", "priceable_item_type"], :name => "priceable_item_idx"
1821
- add_index "pricing_plan_assignments", ["pricing_plan_id"], :name => "index_pricing_plan_assignments_on_pricing_plan_id"
1822
-
1823
- create_table "pricing_plan_components", :force => true do |t|
1824
- t.integer "price_component_type_id"
1825
- t.string "description"
1826
- t.string "comments"
1827
- t.string "internal_identifier"
1828
- t.string "external_identifier"
1829
- t.string "external_id_source"
1830
- t.string "matching_rules"
1831
- t.string "pricing_calculation"
1832
- t.boolean "is_simple_amount"
1833
- t.integer "currency_id"
1834
- t.decimal "money_amount", :precision => 8, :scale => 2
1835
- t.datetime "created_at", :null => false
1836
- t.datetime "updated_at", :null => false
1837
- end
1838
-
1839
- add_index "pricing_plan_components", ["price_component_type_id"], :name => "index_pricing_plan_components_on_price_component_type_id"
1840
-
1841
- create_table "pricing_plans", :force => true do |t|
1842
- t.string "description"
1843
- t.string "comments"
1844
- t.string "internal_identifier"
1845
- t.string "external_identifier"
1846
- t.string "external_id_source"
1847
- t.date "from_date"
1848
- t.date "thru_date"
1849
- t.string "matching_rules"
1850
- t.string "pricing_calculation"
1851
- t.boolean "is_simple_amount"
1852
- t.integer "currency_id"
1853
- t.decimal "money_amount", :precision => 8, :scale => 2
1854
- t.datetime "created_at", :null => false
1855
- t.datetime "updated_at", :null => false
1856
- end
1857
-
1858
- create_table "prod_availability_status_types", :force => true do |t|
1859
- t.integer "parent_id"
1860
- t.integer "lft"
1861
- t.integer "rgt"
1862
- t.string "description"
1863
- t.string "internal_identifier"
1864
- t.string "external_identifier"
1865
- t.string "external_id_source"
1866
- t.datetime "created_at", :null => false
1867
- t.datetime "updated_at", :null => false
1868
- end
1869
-
1870
- create_table "prod_instance_inv_entries", :force => true do |t|
1871
- t.integer "product_instance_id"
1872
- t.integer "inventory_entry_id"
1873
- t.datetime "created_at", :null => false
1874
- t.datetime "updated_at", :null => false
1875
- end
1876
-
1877
- add_index "prod_instance_inv_entries", ["inventory_entry_id"], :name => "index_prod_instance_inv_entries_on_inventory_entry_id"
1878
- add_index "prod_instance_inv_entries", ["product_instance_id"], :name => "index_prod_instance_inv_entries_on_product_instance_id"
1879
-
1880
- create_table "prod_instance_reln_types", :force => true do |t|
1881
- t.integer "parent_id"
1882
- t.integer "lft"
1883
- t.integer "rgt"
1884
- t.string "description"
1885
- t.string "comments"
1886
- t.string "internal_identifier"
1887
- t.string "external_identifier"
1888
- t.string "external_id_source"
1889
- t.datetime "created_at", :null => false
1890
- t.datetime "updated_at", :null => false
1891
- end
1892
-
1893
- add_index "prod_instance_reln_types", ["parent_id"], :name => "index_prod_instance_reln_types_on_parent_id"
1894
-
1895
- create_table "prod_instance_relns", :force => true do |t|
1896
- t.integer "prod_instance_reln_type_id"
1897
- t.string "description"
1898
- t.integer "prod_instance_id_from"
1899
- t.integer "prod_instance_id_to"
1900
- t.integer "role_type_id_from"
1901
- t.integer "role_type_id_to"
1902
- t.integer "status_type_id"
1903
- t.date "from_date"
1904
- t.date "thru_date"
1905
- t.datetime "created_at", :null => false
1906
- t.datetime "updated_at", :null => false
1907
- end
1908
-
1909
- add_index "prod_instance_relns", ["prod_instance_reln_type_id"], :name => "index_prod_instance_relns_on_prod_instance_reln_type_id"
1910
- add_index "prod_instance_relns", ["status_type_id"], :name => "index_prod_instance_relns_on_status_type_id"
1911
-
1912
- create_table "prod_instance_role_types", :force => true do |t|
1913
- t.integer "parent_id"
1914
- t.integer "lft"
1915
- t.integer "rgt"
1916
- t.string "description"
1917
- t.string "comments"
1918
- t.string "internal_identifier"
1919
- t.string "external_identifier"
1920
- t.string "external_id_source"
1921
- t.datetime "created_at", :null => false
1922
- t.datetime "updated_at", :null => false
1923
- end
1924
-
1925
- add_index "prod_instance_role_types", ["parent_id"], :name => "index_prod_instance_role_types_on_parent_id"
1926
-
1927
- create_table "prod_type_reln_types", :force => true do |t|
1928
- t.integer "parent_id"
1929
- t.integer "lft"
1930
- t.integer "rgt"
1931
- t.string "description"
1932
- t.string "comments"
1933
- t.string "internal_identifier"
1934
- t.string "external_identifier"
1935
- t.string "external_id_source"
1936
- t.datetime "created_at", :null => false
1937
- t.datetime "updated_at", :null => false
1938
- end
1939
-
1940
- add_index "prod_type_reln_types", ["parent_id"], :name => "index_prod_type_reln_types_on_parent_id"
1941
-
1942
- create_table "prod_type_relns", :force => true do |t|
1943
- t.integer "prod_type_reln_type_id"
1944
- t.string "description"
1945
- t.integer "prod_type_id_from"
1946
- t.integer "prod_type_id_to"
1947
- t.integer "role_type_id_from"
1948
- t.integer "role_type_id_to"
1949
- t.integer "status_type_id"
1950
- t.date "from_date"
1951
- t.date "thru_date"
1952
- t.datetime "created_at", :null => false
1953
- t.datetime "updated_at", :null => false
1954
- end
1955
-
1956
- add_index "prod_type_relns", ["prod_type_reln_type_id"], :name => "index_prod_type_relns_on_prod_type_reln_type_id"
1957
- add_index "prod_type_relns", ["status_type_id"], :name => "index_prod_type_relns_on_status_type_id"
1958
-
1959
- create_table "prod_type_role_types", :force => true do |t|
1960
- t.integer "parent_id"
1961
- t.integer "lft"
1962
- t.integer "rgt"
1963
- t.string "description"
1964
- t.string "comments"
1965
- t.string "internal_identifier"
1966
- t.string "external_identifier"
1967
- t.string "external_id_source"
1968
- t.datetime "created_at", :null => false
1969
- t.datetime "updated_at", :null => false
1970
- end
1971
-
1972
- add_index "prod_type_role_types", ["parent_id"], :name => "index_prod_type_role_types_on_parent_id"
1973
-
1974
- create_table "product_instance_status_types", :force => true do |t|
1975
- t.integer "parent_id"
1976
- t.integer "lft"
1977
- t.integer "rgt"
1978
- t.string "description"
1979
- t.string "internal_identifier"
1980
- t.string "external_identifier"
1981
- t.string "external_id_source"
1982
- t.datetime "created_at", :null => false
1983
- t.datetime "updated_at", :null => false
1984
- end
1985
-
1986
- create_table "product_instances", :force => true do |t|
1987
- t.integer "parent_id"
1988
- t.integer "lft"
1989
- t.integer "rgt"
1990
- t.string "description"
1991
- t.integer "product_instance_record_id"
1992
- t.string "product_instance_record_type"
1993
- t.string "external_identifier"
1994
- t.string "external_id_source"
1995
- t.integer "product_type_id"
1996
- t.string "type"
1997
- t.integer "prod_availability_status_type_id"
1998
- t.datetime "created_at", :null => false
1999
- t.datetime "updated_at", :null => false
2000
- end
2001
-
2002
- add_index "product_instances", ["parent_id"], :name => "index_product_instances_on_parent_id"
2003
- add_index "product_instances", ["product_instance_record_id", "product_instance_record_type"], :name => "bpi_2"
2004
- add_index "product_instances", ["product_type_id"], :name => "index_product_instances_on_product_type_id"
2005
-
2006
- create_table "product_offers", :force => true do |t|
2007
- t.string "description"
2008
- t.integer "product_offer_record_id"
2009
- t.string "product_offer_record_type"
2010
- t.string "external_identifier"
2011
- t.string "external_id_source"
2012
- t.datetime "created_at", :null => false
2013
- t.datetime "updated_at", :null => false
2014
- end
2015
-
2016
- add_index "product_offers", ["product_offer_record_id", "product_offer_record_type"], :name => "bpi_3"
2017
-
2018
- create_table "product_types", :force => true do |t|
2019
- t.integer "parent_id"
2020
- t.integer "lft"
2021
- t.integer "rgt"
2022
- t.string "description"
2023
- t.integer "product_type_record_id"
2024
- t.string "product_type_record_type"
2025
- t.string "external_identifier"
2026
- t.string "internal_identifier"
2027
- t.string "external_id_source"
2028
- t.string "default_image_url"
2029
- t.integer "list_view_image_id"
2030
- t.datetime "created_at", :null => false
2031
- t.datetime "updated_at", :null => false
2032
- end
2033
-
2034
- add_index "product_types", ["parent_id"], :name => "index_product_types_on_parent_id"
2035
- add_index "product_types", ["product_type_record_id", "product_type_record_type"], :name => "bpi_1"
2036
-
2037
- create_table "published_elements", :force => true do |t|
2038
- t.integer "published_website_id"
2039
- t.integer "published_element_record_id"
2040
- t.string "published_element_record_type"
2041
- t.integer "version"
2042
- t.integer "published_by_id"
2043
- t.datetime "created_at", :null => false
2044
- t.datetime "updated_at", :null => false
2045
- end
2046
-
2047
- add_index "published_elements", ["published_by_id"], :name => "index_published_elements_on_published_by_id"
2048
- add_index "published_elements", ["published_element_record_id", "published_element_record_type"], :name => "published_elm_idx"
2049
- add_index "published_elements", ["published_website_id"], :name => "index_published_elements_on_published_website_id"
2050
- add_index "published_elements", ["version"], :name => "index_published_elements_on_version"
2051
-
2052
- create_table "published_websites", :force => true do |t|
2053
- t.integer "website_id"
2054
- t.text "comment"
2055
- t.decimal "version", :precision => 18, :scale => 6
2056
- t.boolean "active"
2057
- t.integer "published_by_id"
2058
- t.datetime "created_at", :null => false
2059
- t.datetime "updated_at", :null => false
2060
- end
2061
-
2062
- add_index "published_websites", ["active"], :name => "index_published_websites_on_active"
2063
- add_index "published_websites", ["published_by_id"], :name => "index_published_websites_on_published_by_id"
2064
- add_index "published_websites", ["version"], :name => "index_published_websites_on_version"
2065
- add_index "published_websites", ["website_id"], :name => "index_published_websites_on_website_id"
2066
-
2067
- create_table "recurring_payments", :force => true do |t|
2068
- t.integer "payment_account_id"
2069
- t.string "payment_account_type"
2070
- t.integer "billing_account_id"
2071
- t.decimal "pay_up_to_amount", :precision => 8, :scale => 2
2072
- t.decimal "payment_amount", :precision => 8, :scale => 2
2073
- t.integer "payment_day"
2074
- t.date "from_date"
2075
- t.date "thru_date"
2076
- t.boolean "enabled"
2077
- t.boolean "text_to_pay"
2078
- t.datetime "created_at", :null => false
2079
- t.datetime "updated_at", :null => false
2080
- end
2081
-
2082
- add_index "recurring_payments", ["billing_account_id"], :name => "index_recurring_payments_on_billing_account_id"
2083
- add_index "recurring_payments", ["payment_account_id", "payment_account_type"], :name => "payment_account_idx"
2084
-
2085
- create_table "relationship_types", :force => true do |t|
2086
- t.integer "parent_id"
2087
- t.integer "lft"
2088
- t.integer "rgt"
2089
- t.integer "valid_from_role_type_id"
2090
- t.integer "valid_to_role_type_id"
2091
- t.string "name"
2092
- t.string "description"
2093
- t.string "internal_identifier"
2094
- t.string "external_identifier"
2095
- t.string "external_id_source"
2096
- t.datetime "created_at", :null => false
2097
- t.datetime "updated_at", :null => false
2098
- end
2099
-
2100
- add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
2101
- add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
2102
-
2103
- create_table "role_types", :force => true do |t|
2104
- t.integer "parent_id"
2105
- t.integer "lft"
2106
- t.integer "rgt"
2107
- t.string "description"
2108
- t.string "comments"
2109
- t.string "internal_identifier"
2110
- t.string "external_identifier"
2111
- t.string "external_id_source"
2112
- t.datetime "created_at", :null => false
2113
- t.datetime "updated_at", :null => false
2114
- end
2115
-
2116
- create_table "roles", :force => true do |t|
2117
- t.string "description"
2118
- t.string "internal_identifier"
2119
- t.string "external_identifier"
2120
- t.string "external_id_source"
2121
- t.datetime "created_at", :null => false
2122
- t.datetime "updated_at", :null => false
2123
- end
2124
-
2125
- create_table "roles_secured_models", :id => false, :force => true do |t|
2126
- t.integer "secured_model_id"
2127
- t.integer "role_id"
2128
- end
2129
-
2130
- add_index "roles_secured_models", ["role_id"], :name => "index_roles_secured_models_on_role_id"
2131
- add_index "roles_secured_models", ["secured_model_id"], :name => "index_roles_secured_models_on_secured_model_id"
2132
-
2133
- create_table "secured_models", :force => true do |t|
2134
- t.integer "secured_record_id"
2135
- t.string "secured_record_type"
2136
- t.datetime "created_at", :null => false
2137
- t.datetime "updated_at", :null => false
2138
- end
2139
-
2140
- add_index "secured_models", ["secured_record_id", "secured_record_type"], :name => "secured_record_idx"
2141
-
2142
- create_table "sessions", :force => true do |t|
2143
- t.string "session_id", :null => false
2144
- t.text "data"
2145
- t.datetime "created_at", :null => false
2146
- t.datetime "updated_at", :null => false
2147
- end
2148
-
2149
- add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
2150
- add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
2151
-
2152
- create_table "simple_product_offers", :force => true do |t|
2153
- t.string "description"
2154
- t.integer "product_id"
2155
- t.decimal "base_price", :precision => 8, :scale => 2
2156
- t.integer "uom"
2157
- t.datetime "created_at", :null => false
2158
- t.datetime "updated_at", :null => false
2159
- end
2160
-
2161
- add_index "simple_product_offers", ["product_id"], :name => "index_simple_product_offers_on_product_id"
2162
-
2163
- create_table "taggings", :force => true do |t|
2164
- t.integer "tag_id"
2165
- t.integer "taggable_id"
2166
- t.integer "tagger_id"
2167
- t.string "tagger_type"
2168
- t.string "taggable_type"
2169
- t.string "context"
2170
- t.datetime "created_at"
2171
- end
2172
-
2173
- add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
2174
- add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "taggable_poly_idx"
2175
-
2176
- create_table "tags", :force => true do |t|
2177
- t.string "name"
2178
- end
2179
-
2180
- create_table "themes", :force => true do |t|
2181
- t.integer "website_id"
2182
- t.string "name"
2183
- t.string "theme_id"
2184
- t.string "author"
2185
- t.integer "version"
2186
- t.string "homepage"
2187
- t.text "summary"
2188
- t.integer "active"
2189
- t.datetime "created_at", :null => false
2190
- t.datetime "updated_at", :null => false
2191
- end
2192
-
2193
- add_index "themes", ["active"], :name => "index_themes_on_active"
2194
- add_index "themes", ["website_id"], :name => "index_themes_on_website_id"
2195
-
2196
- create_table "tickets", :force => true do |t|
2197
- t.datetime "created_at", :null => false
2198
- t.datetime "updated_at", :null => false
2199
- end
2200
-
2201
- create_table "tree_menu_node_defs", :force => true do |t|
2202
- t.string "node_type"
2203
- t.integer "parent_id"
2204
- t.integer "lft"
2205
- t.integer "rgt"
2206
- t.string "menu_short_name"
2207
- t.string "menu_description"
2208
- t.string "text"
2209
- t.string "icon_url"
2210
- t.string "target_url"
2211
- t.string "resource_class"
2212
- t.datetime "created_at", :null => false
2213
- t.datetime "updated_at", :null => false
2214
- end
2215
-
2216
- add_index "tree_menu_node_defs", ["parent_id"], :name => "index_tree_menu_node_defs_on_parent_id"
2217
-
2218
- create_table "user_preferences", :force => true do |t|
2219
- t.integer "user_id"
2220
- t.integer "preference_id"
2221
- t.integer "preferenced_record_id"
2222
- t.string "preferenced_record_type"
2223
- t.datetime "created_at", :null => false
2224
- t.datetime "updated_at", :null => false
2225
- end
2226
-
2227
- add_index "user_preferences", ["preference_id"], :name => "index_user_preferences_on_preference_id"
2228
- add_index "user_preferences", ["preferenced_record_id"], :name => "index_user_preferences_on_preferenced_record_id"
2229
- add_index "user_preferences", ["preferenced_record_type"], :name => "index_user_preferences_on_preferenced_record_type"
2230
- add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
2231
-
2232
- create_table "users", :force => true do |t|
2233
- t.string "username"
2234
- t.string "email"
2235
- t.integer "party_id"
2236
- t.string "type"
2237
- t.string "salt"
2238
- t.string "crypted_password"
2239
- t.datetime "last_login_at"
2240
- t.datetime "last_logout_at"
2241
- t.datetime "last_activity_at"
2242
- t.integer "failed_logins_count", :default => 0
2243
- t.datetime "lock_expires_at"
2244
- t.string "remember_me_token"
2245
- t.datetime "remember_me_token_expires_at"
2246
- t.string "reset_password_token"
2247
- t.datetime "reset_password_token_expires_at"
2248
- t.datetime "reset_password_email_sent_at"
2249
- t.string "activation_state"
2250
- t.string "activation_token"
2251
- t.datetime "activation_token_expires_at"
2252
- t.string "security_question_1"
2253
- t.string "security_answer_1"
2254
- t.string "security_question_2"
2255
- t.string "security_answer_2"
2256
- t.datetime "created_at", :null => false
2257
- t.datetime "updated_at", :null => false
2258
- end
2259
-
2260
- add_index "users", ["activation_token"], :name => "index_users_on_activation_token"
2261
- add_index "users", ["email"], :name => "index_users_on_email", :unique => true
2262
- add_index "users", ["last_logout_at", "last_activity_at"], :name => "activity_idx"
2263
- add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token"
2264
- add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token"
2265
- add_index "users", ["username"], :name => "index_users_on_username", :unique => true
2266
-
2267
- create_table "valid_configurations", :force => true do |t|
2268
- t.integer "configured_item_id"
2269
- t.string "configured_item_type"
2270
- t.integer "configuration_id"
2271
- t.datetime "created_at", :null => false
2272
- t.datetime "updated_at", :null => false
2273
- end
2274
-
2275
- add_index "valid_configurations", ["configuration_id"], :name => "index_valid_configurations_on_configuration_id"
2276
- add_index "valid_configurations", ["configured_item_id", "configured_item_type"], :name => "configured_item_poly_idx"
2277
-
2278
- create_table "valid_documents", :force => true do |t|
2279
- t.integer "document_id"
2280
- t.integer "documented_model_id"
2281
- t.string "documented_model_type"
2282
- end
2283
-
2284
- add_index "valid_documents", ["document_id"], :name => "index_valid_documents_on_document_id"
2285
- add_index "valid_documents", ["documented_model_id", "documented_model_type"], :name => "valid_documents_model_idx"
2286
-
2287
- create_table "valid_note_types", :force => true do |t|
2288
- t.integer "valid_note_type_record_id"
2289
- t.string "valid_note_type_record_type"
2290
- t.integer "note_type_id"
2291
- t.datetime "created_at", :null => false
2292
- t.datetime "updated_at", :null => false
2293
- end
2294
-
2295
- add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
2296
- add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
2297
-
2298
- create_table "valid_preference_types", :force => true do |t|
2299
- t.integer "preference_type_id"
2300
- t.integer "preferenced_record_id"
2301
- t.string "preferenced_record_type"
2302
- end
2303
-
2304
- create_table "valid_price_plan_components", :force => true do |t|
2305
- t.integer "pricing_plan_id"
2306
- t.integer "pricing_plan_component_id"
2307
- t.datetime "created_at", :null => false
2308
- t.datetime "updated_at", :null => false
2309
- end
2310
-
2311
- add_index "valid_price_plan_components", ["pricing_plan_component_id"], :name => "index_valid_price_plan_components_on_pricing_plan_component_id"
2312
- add_index "valid_price_plan_components", ["pricing_plan_id"], :name => "index_valid_price_plan_components_on_pricing_plan_id"
2313
-
2314
- create_table "valid_work_assignment_attributes", :force => true do |t|
2315
- t.integer "valid_work_assignment_id"
2316
- t.string "name"
2317
- t.string "type"
2318
- t.string "value"
2319
- t.datetime "created_at", :null => false
2320
- t.datetime "updated_at", :null => false
2321
- end
2322
-
2323
- create_table "valid_work_assignments", :force => true do |t|
2324
- t.integer "role_type_id"
2325
- t.integer "work_requirement_id"
2326
- t.datetime "created_at", :null => false
2327
- t.datetime "updated_at", :null => false
2328
- end
2329
-
2330
- create_table "view_types", :force => true do |t|
2331
- t.string "internal_identifier"
2332
- t.string "description"
2333
- t.datetime "created_at", :null => false
2334
- t.datetime "updated_at", :null => false
2335
- end
2336
-
2337
- create_table "website_hosts", :force => true do |t|
2338
- t.integer "website_id"
2339
- t.string "host"
2340
- t.datetime "created_at", :null => false
2341
- t.datetime "updated_at", :null => false
2342
- end
2343
-
2344
- add_index "website_hosts", ["website_id"], :name => "index_website_hosts_on_website_id"
2345
-
2346
- create_table "website_inquiries", :force => true do |t|
2347
- t.integer "website_id"
2348
- t.datetime "created_at", :null => false
2349
- t.datetime "updated_at", :null => false
2350
- end
2351
-
2352
- add_index "website_inquiries", ["website_id"], :name => "index_website_inquiries_on_website_id"
2353
-
2354
- create_table "website_nav_items", :force => true do |t|
2355
- t.integer "website_nav_id"
2356
- t.string "title"
2357
- t.string "url"
2358
- t.integer "position", :default => 0
2359
- t.integer "linked_to_item_id"
2360
- t.string "linked_to_item_type"
2361
- t.integer "parent_id"
2362
- t.integer "lft"
2363
- t.integer "rgt"
2364
- t.datetime "created_at", :null => false
2365
- t.datetime "updated_at", :null => false
2366
- end
2367
-
2368
- add_index "website_nav_items", ["lft"], :name => "index_website_nav_items_on_lft"
2369
- add_index "website_nav_items", ["linked_to_item_id", "linked_to_item_type"], :name => "linked_to_idx"
2370
- add_index "website_nav_items", ["parent_id"], :name => "index_website_nav_items_on_parent_id"
2371
- add_index "website_nav_items", ["position"], :name => "index_website_nav_items_on_position"
2372
- add_index "website_nav_items", ["rgt"], :name => "index_website_nav_items_on_rgt"
2373
- add_index "website_nav_items", ["website_nav_id"], :name => "index_website_nav_items_on_website_nav_id"
2374
-
2375
- create_table "website_navs", :force => true do |t|
2376
- t.integer "website_id"
2377
- t.string "name"
2378
- t.datetime "created_at", :null => false
2379
- t.datetime "updated_at", :null => false
2380
- end
2381
-
2382
- add_index "website_navs", ["website_id"], :name => "index_website_navs_on_website_id"
2383
-
2384
- create_table "website_party_roles", :force => true do |t|
2385
- t.integer "website_id"
2386
- t.integer "role_type_id"
2387
- t.integer "party_id"
2388
- t.datetime "created_at", :null => false
2389
- t.datetime "updated_at", :null => false
2390
- end
2391
-
2392
- add_index "website_party_roles", ["party_id"], :name => "index_website_party_roles_on_party_id"
2393
- add_index "website_party_roles", ["role_type_id"], :name => "index_website_party_roles_on_role_type_id"
2394
- add_index "website_party_roles", ["website_id"], :name => "index_website_party_roles_on_website_id"
2395
-
2396
- create_table "website_section_contents", :force => true do |t|
2397
- t.integer "website_section_id"
2398
- t.integer "content_id"
2399
- t.string "content_area"
2400
- t.integer "position", :default => 0
2401
- t.datetime "created_at", :null => false
2402
- t.datetime "updated_at", :null => false
2403
- end
2404
-
2405
- add_index "website_section_contents", ["content_area"], :name => "index_website_section_contents_on_content_area"
2406
- add_index "website_section_contents", ["content_id"], :name => "index_website_section_contents_on_content_id"
2407
- add_index "website_section_contents", ["position"], :name => "index_website_section_contents_on_position"
2408
- add_index "website_section_contents", ["website_section_id"], :name => "index_website_section_contents_on_website_section_id"
2409
-
2410
- create_table "website_section_versions", :force => true do |t|
2411
- t.integer "website_section_id"
2412
- t.integer "version"
2413
- t.string "title"
2414
- t.integer "website_id"
2415
- t.string "path"
2416
- t.string "permalink"
2417
- t.text "layout"
2418
- t.boolean "in_menu"
2419
- t.integer "position", :default => 0
2420
- t.string "internal_identifier"
2421
- t.boolean "render_base_layout", :default => true
2422
- t.datetime "created_at"
2423
- t.datetime "updated_at"
2424
- t.string "versioned_type"
2425
- end
2426
-
2427
- add_index "website_section_versions", ["website_section_id"], :name => "index_website_section_versions_on_website_section_id"
2428
-
2429
- create_table "website_sections", :force => true do |t|
2430
- t.string "title"
2431
- t.string "type"
2432
- t.integer "website_id"
2433
- t.string "path"
2434
- t.string "permalink"
2435
- t.text "layout"
2436
- t.boolean "in_menu"
2437
- t.integer "position", :default => 0
2438
- t.string "internal_identifier"
2439
- t.integer "version"
2440
- t.boolean "render_base_layout", :default => true
2441
- t.integer "parent_id"
2442
- t.integer "lft"
2443
- t.integer "rgt"
2444
- t.datetime "created_at", :null => false
2445
- t.datetime "updated_at", :null => false
2446
- end
2447
-
2448
- add_index "website_sections", ["internal_identifier"], :name => "section_iid_idx"
2449
- add_index "website_sections", ["lft"], :name => "index_website_sections_on_lft"
2450
- add_index "website_sections", ["parent_id"], :name => "index_website_sections_on_parent_id"
2451
- add_index "website_sections", ["permalink"], :name => "index_website_sections_on_permalink"
2452
- add_index "website_sections", ["position"], :name => "index_website_sections_on_position"
2453
- add_index "website_sections", ["rgt"], :name => "index_website_sections_on_rgt"
2454
- add_index "website_sections", ["version"], :name => "index_website_sections_on_version"
2455
- add_index "website_sections", ["website_id"], :name => "index_website_sections_on_website_id"
2456
-
2457
- create_table "websites", :force => true do |t|
2458
- t.string "name"
2459
- t.string "title"
2460
- t.string "subtitle"
2461
- t.string "internal_identifier"
2462
- t.string "email"
2463
- t.boolean "auto_activate_publication"
2464
- t.boolean "email_inquiries"
2465
- t.datetime "created_at", :null => false
2466
- t.datetime "updated_at", :null => false
2467
- end
2468
-
2469
- create_table "widgets", :force => true do |t|
2470
- t.string "description"
2471
- t.string "internal_identifier"
2472
- t.string "icon"
2473
- t.string "xtype"
2474
- t.datetime "created_at", :null => false
2475
- t.datetime "updated_at", :null => false
2476
- end
2477
-
2478
- create_table "work_effort_assignments", :force => true do |t|
2479
- t.integer "work_effort_id"
2480
- t.datetime "assigned_at"
2481
- t.datetime "assigned_from"
2482
- t.datetime "assigned_thru"
2483
- t.datetime "unassigned_at"
2484
- t.integer "assigned_to_id"
2485
- t.string "assigned_to_type"
2486
- t.integer "assigned_by_id"
2487
- t.string "assigned_by_type"
2488
- t.datetime "created_at", :null => false
2489
- t.datetime "updated_at", :null => false
2490
- end
2491
-
2492
- add_index "work_effort_assignments", ["assigned_from"], :name => "index_work_effort_assignments_on_assigned_from"
2493
- add_index "work_effort_assignments", ["assigned_thru"], :name => "index_work_effort_assignments_on_assigned_thru"
2494
- add_index "work_effort_assignments", ["assigned_to_id", "assigned_to_type"], :name => "assigned_to"
2495
- add_index "work_effort_assignments", ["work_effort_id"], :name => "index_work_effort_assignments_on_work_effort_id"
2496
-
2497
- create_table "work_effort_status_types", :force => true do |t|
2498
- t.string "internal_identifier"
2499
- t.string "description"
2500
- t.integer "next_status_id"
2501
- t.integer "previous_status_id"
2502
- t.datetime "created_at", :null => false
2503
- t.datetime "updated_at", :null => false
2504
- end
2505
-
2506
- add_index "work_effort_status_types", ["description"], :name => "index_work_effort_status_types_on_description"
2507
- add_index "work_effort_status_types", ["internal_identifier"], :name => "index_work_effort_status_types_on_internal_identifier"
2508
-
2509
- create_table "work_effort_statuses", :force => true do |t|
2510
- t.datetime "started_at"
2511
- t.datetime "finished_at"
2512
- t.integer "work_effort_id"
2513
- t.integer "work_effort_status_type_id"
2514
- t.datetime "created_at", :null => false
2515
- t.datetime "updated_at", :null => false
2516
- end
2517
-
2518
- add_index "work_effort_statuses", ["work_effort_id"], :name => "index_work_effort_statuses_on_work_effort_id"
2519
- add_index "work_effort_statuses", ["work_effort_status_type_id"], :name => "index_work_effort_statuses_on_work_effort_status_type_id"
2520
-
2521
- create_table "work_efforts", :force => true do |t|
2522
- t.string "description"
2523
- t.string "type"
2524
- t.datetime "started_at"
2525
- t.datetime "finished_at"
2526
- t.integer "projected_completion_time"
2527
- t.integer "actual_completion_time"
2528
- t.datetime "created_at", :null => false
2529
- t.datetime "updated_at", :null => false
2530
- t.integer "facility_id"
2531
- t.string "facility_type"
2532
- t.integer "work_effort_record_id"
2533
- t.string "work_effort_record_type"
2534
- t.integer "projected_cost_id"
2535
- t.integer "actual_cost_id"
2536
- t.integer "parent_id"
2537
- t.integer "lft"
2538
- t.integer "rgt"
2539
- end
2540
-
2541
- add_index "work_efforts", ["facility_type", "facility_id"], :name => "facility"
2542
- add_index "work_efforts", ["finished_at"], :name => "index_work_efforts_on_finished_at"
2543
- add_index "work_efforts", ["work_effort_record_id", "work_effort_record_type"], :name => "work_effort_record_id_type"
2544
-
2545
- create_table "work_requirement_work_effort_status_types", :force => true do |t|
2546
- t.datetime "created_at", :null => false
2547
- t.datetime "updated_at", :null => false
2548
- t.integer "work_requirement_id"
2549
- t.integer "work_effort_status_type_id"
2550
- t.boolean "is_initial_status"
2551
- end
2552
-
2553
- create_table "work_requirements", :force => true do |t|
2554
- t.string "description"
2555
- t.string "type"
2556
- t.integer "projected_completion_time"
2557
- t.datetime "created_at", :null => false
2558
- t.datetime "updated_at", :null => false
2559
- t.integer "work_requirement_record_id"
2560
- t.string "work_requirement_record_type"
2561
- t.integer "facility_id"
2562
- t.string "facility_type"
2563
- t.integer "cost_id"
2564
- t.integer "parent_id"
2565
- t.integer "lft"
2566
- t.integer "rgt"
2567
- end
2568
-
2569
- end