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