erp_products 3.0.5 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/models/prod_availability_status_type.rb +2 -0
- data/app/models/prod_instance_reln.rb +1 -0
- data/app/models/prod_instance_reln_type.rb +2 -0
- data/app/models/prod_instance_role_type.rb +2 -0
- data/app/models/prod_type_reln.rb +1 -0
- data/app/models/prod_type_reln_type.rb +2 -0
- data/app/models/prod_type_role_type.rb +2 -0
- data/app/models/product_instance.rb +2 -0
- data/app/models/product_offer.rb +1 -0
- data/app/models/product_type.rb +2 -0
- data/app/models/simple_product_offer.rb +2 -0
- data/db/migrate/20080805000040_base_products.rb +1 -0
- data/lib/erp_products.rb +2 -0
- data/lib/erp_products/version.rb +2 -2
- data/spec/dummy/config/application.rb +6 -0
- data/spec/dummy/config/environments/spec.rb +3 -0
- data/spec/dummy/db/data_migrations/20101011152441_payment_gateway_actions.erp_commerce.rb +28 -0
- data/spec/dummy/db/data_migrations/20101014142230_financial_txn_types.erp_txns_and_accts.rb +16 -0
- data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +15 -0
- data/spec/dummy/db/data_migrations/20110324010232_product_role_types.erp_products.rb +24 -0
- data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +12 -0
- data/spec/dummy/db/data_migrations/20110527160807_add_default_prod_avail_types.erp_products.rb +27 -0
- data/spec/dummy/db/data_migrations/20110605231556_create_order_party_roles.erp_orders.rb +24 -0
- data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +19 -0
- data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +252 -0
- data/spec/dummy/db/data_migrations/20110728201730_create_desktop_app_product_manager.erp_products.rb +26 -0
- data/spec/dummy/db/data_migrations/20110728201731_create_desktop_app_order_manager.erp_orders.rb +26 -0
- data/spec/dummy/db/data_migrations/20110728201732_create_organizer_app_order_management.erp_orders.rb +15 -0
- data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +53 -0
- data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +16 -0
- data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +21 -0
- data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +32 -0
- data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +12 -0
- data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +23 -0
- data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +42 -0
- data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +22 -0
- data/spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb +14 -0
- data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +29 -0
- data/spec/dummy/db/data_migrations/20120229174343_add_orders_widget.erp_orders.rb +29 -0
- data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +11 -0
- data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +19 -0
- data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +23 -0
- data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +20 -0
- data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +16 -0
- data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +24 -0
- data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +23 -0
- data/spec/dummy/db/migrate/20130107214711_base_erp_services.erp_base_erp_svcs.rb +461 -0
- data/spec/dummy/db/migrate/20130107214712_base_products.erp_products.rb +234 -0
- data/spec/dummy/db/migrate/20130107214713_base_products_indexes.erp_products.rb +59 -0
- data/spec/dummy/db/migrate/20130107214714_base_tech_services.erp_tech_svcs.rb +271 -0
- data/spec/dummy/db/migrate/20130107214715_create_has_attribute_tables.erp_tech_svcs.rb +39 -0
- data/spec/dummy/db/migrate/20130107214716_create_groups.erp_tech_svcs.rb +19 -0
- data/spec/dummy/db/migrate/20130107214717_upgrade_security.erp_tech_svcs.rb +54 -0
- data/spec/dummy/db/migrate/20130107214718_upgrade_security2.erp_tech_svcs.rb +270 -0
- data/spec/dummy/db/migrate/20130107214719_base_orders.erp_orders.rb +178 -0
- data/spec/dummy/db/migrate/20130107214720_base_txns_and_accts.erp_txns_and_accts.rb +364 -0
- data/spec/dummy/db/migrate/20130107214721_agreements_services.erp_agreements.rb +160 -0
- data/spec/dummy/db/migrate/20130107214722_agreements_services_indexes.erp_agreements.rb +52 -0
- data/spec/dummy/db/migrate/20130107214723_base_app_framework.erp_app.rb +276 -0
- data/spec/dummy/db/migrate/20130107214724_erp_commerce_base.erp_commerce.rb +442 -0
- data/spec/dummy/db/schema.rb +1821 -0
- data/spec/dummy/db/spec.sqlite3 +0 -0
- data/spec/dummy/log/spec.log +12388 -0
- data/spec/spec_helper.rb +11 -3
- metadata +119 -10
- data/db/migrate/20120612195842_add_internal_identifier_to_product_type.rb +0 -9
| @@ -0,0 +1,1821 @@ | |
| 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 => 20130107214724) 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   "description"
         | 
| 559 | 
            +
                t.integer  "capability_type_id"
         | 
| 560 | 
            +
                t.string   "capability_resource_type"
         | 
| 561 | 
            +
                t.integer  "capability_resource_id"
         | 
| 562 | 
            +
                t.integer  "scope_type_id"
         | 
| 563 | 
            +
                t.text     "scope_query"
         | 
| 564 | 
            +
                t.datetime "created_at",               :null => false
         | 
| 565 | 
            +
                t.datetime "updated_at",               :null => false
         | 
| 566 | 
            +
              end
         | 
| 567 | 
            +
             | 
| 568 | 
            +
              add_index "capabilities", ["capability_resource_id", "capability_resource_type"], :name => "capability_resource_index"
         | 
| 569 | 
            +
              add_index "capabilities", ["capability_type_id"], :name => "index_capabilities_on_capability_type_id"
         | 
| 570 | 
            +
              add_index "capabilities", ["scope_type_id"], :name => "index_capabilities_on_scope_type_id"
         | 
| 571 | 
            +
             | 
| 572 | 
            +
              create_table "capability_accessors", :force => true do |t|
         | 
| 573 | 
            +
                t.string   "capability_accessor_record_type"
         | 
| 574 | 
            +
                t.integer  "capability_accessor_record_id"
         | 
| 575 | 
            +
                t.integer  "capability_id"
         | 
| 576 | 
            +
                t.datetime "created_at",                      :null => false
         | 
| 577 | 
            +
                t.datetime "updated_at",                      :null => false
         | 
| 578 | 
            +
              end
         | 
| 579 | 
            +
             | 
| 580 | 
            +
              add_index "capability_accessors", ["capability_accessor_record_id", "capability_accessor_record_type"], :name => "capability_accessor_record_index"
         | 
| 581 | 
            +
              add_index "capability_accessors", ["capability_id"], :name => "index_capability_accessors_on_capability_id"
         | 
| 582 | 
            +
             | 
| 583 | 
            +
              create_table "capability_types", :force => true do |t|
         | 
| 584 | 
            +
                t.string   "internal_identifier"
         | 
| 585 | 
            +
                t.string   "description"
         | 
| 586 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 587 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 588 | 
            +
              end
         | 
| 589 | 
            +
             | 
| 590 | 
            +
              create_table "capable_models", :force => true do |t|
         | 
| 591 | 
            +
                t.integer  "capable_model_record_id"
         | 
| 592 | 
            +
                t.string   "capable_model_record_type"
         | 
| 593 | 
            +
                t.datetime "created_at",                :null => false
         | 
| 594 | 
            +
                t.datetime "updated_at",                :null => false
         | 
| 595 | 
            +
              end
         | 
| 596 | 
            +
             | 
| 597 | 
            +
              add_index "capable_models", ["capable_model_record_id", "capable_model_record_type"], :name => "capable_model_record_idx"
         | 
| 598 | 
            +
             | 
| 599 | 
            +
              create_table "categories", :force => true do |t|
         | 
| 600 | 
            +
                t.string   "description"
         | 
| 601 | 
            +
                t.string   "external_identifier"
         | 
| 602 | 
            +
                t.datetime "from_date"
         | 
| 603 | 
            +
                t.datetime "to_date"
         | 
| 604 | 
            +
                t.string   "internal_identifier"
         | 
| 605 | 
            +
                t.integer  "category_record_id"
         | 
| 606 | 
            +
                t.string   "category_record_type"
         | 
| 607 | 
            +
                t.integer  "parent_id"
         | 
| 608 | 
            +
                t.integer  "lft"
         | 
| 609 | 
            +
                t.integer  "rgt"
         | 
| 610 | 
            +
                t.datetime "created_at",           :null => false
         | 
| 611 | 
            +
                t.datetime "updated_at",           :null => false
         | 
| 612 | 
            +
              end
         | 
| 613 | 
            +
             | 
| 614 | 
            +
              add_index "categories", ["category_record_id", "category_record_type"], :name => "category_polymorphic"
         | 
| 615 | 
            +
             | 
| 616 | 
            +
              create_table "category_classifications", :force => true do |t|
         | 
| 617 | 
            +
                t.integer  "category_id"
         | 
| 618 | 
            +
                t.string   "classification_type"
         | 
| 619 | 
            +
                t.integer  "classification_id"
         | 
| 620 | 
            +
                t.datetime "from_date"
         | 
| 621 | 
            +
                t.datetime "to_date"
         | 
| 622 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 623 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 624 | 
            +
              end
         | 
| 625 | 
            +
             | 
| 626 | 
            +
              add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
         | 
| 627 | 
            +
             | 
| 628 | 
            +
              create_table "charge_line_payment_txns", :force => true do |t|
         | 
| 629 | 
            +
                t.integer  "charge_line_id"
         | 
| 630 | 
            +
                t.integer  "payment_txn_id"
         | 
| 631 | 
            +
                t.string   "payment_txn_type"
         | 
| 632 | 
            +
                t.datetime "created_at",       :null => false
         | 
| 633 | 
            +
                t.datetime "updated_at",       :null => false
         | 
| 634 | 
            +
              end
         | 
| 635 | 
            +
             | 
| 636 | 
            +
              add_index "charge_line_payment_txns", ["charge_line_id"], :name => "index_charge_line_payment_txns_on_charge_line_id"
         | 
| 637 | 
            +
              add_index "charge_line_payment_txns", ["payment_txn_id", "payment_txn_type"], :name => "payment_txn_idx"
         | 
| 638 | 
            +
             | 
| 639 | 
            +
              create_table "charge_lines", :force => true do |t|
         | 
| 640 | 
            +
                t.string   "sti_type"
         | 
| 641 | 
            +
                t.integer  "money_id"
         | 
| 642 | 
            +
                t.string   "description"
         | 
| 643 | 
            +
                t.string   "external_identifier"
         | 
| 644 | 
            +
                t.string   "external_id_source"
         | 
| 645 | 
            +
                t.integer  "charged_item_id"
         | 
| 646 | 
            +
                t.string   "charged_item_type"
         | 
| 647 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 648 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 649 | 
            +
              end
         | 
| 650 | 
            +
             | 
| 651 | 
            +
              add_index "charge_lines", ["charged_item_id", "charged_item_type"], :name => "charged_item_idx"
         | 
| 652 | 
            +
             | 
| 653 | 
            +
              create_table "compass_ae_instances", :force => true do |t|
         | 
| 654 | 
            +
                t.decimal  "version",    :precision => 8, :scale => 3
         | 
| 655 | 
            +
                t.datetime "created_at",                               :null => false
         | 
| 656 | 
            +
                t.datetime "updated_at",                               :null => false
         | 
| 657 | 
            +
              end
         | 
| 658 | 
            +
             | 
| 659 | 
            +
              create_table "configuration_item_types", :force => true do |t|
         | 
| 660 | 
            +
                t.integer  "parent_id"
         | 
| 661 | 
            +
                t.integer  "lft"
         | 
| 662 | 
            +
                t.integer  "rgt"
         | 
| 663 | 
            +
                t.string   "description"
         | 
| 664 | 
            +
                t.string   "internal_identifier"
         | 
| 665 | 
            +
                t.boolean  "allow_user_defined_options", :default => false
         | 
| 666 | 
            +
                t.boolean  "is_multi_optional",          :default => false
         | 
| 667 | 
            +
                t.datetime "created_at",                                    :null => false
         | 
| 668 | 
            +
                t.datetime "updated_at",                                    :null => false
         | 
| 669 | 
            +
              end
         | 
| 670 | 
            +
             | 
| 671 | 
            +
              create_table "configuration_item_types_configuration_options", :force => true do |t|
         | 
| 672 | 
            +
                t.integer  "configuration_item_type_id"
         | 
| 673 | 
            +
                t.integer  "configuration_option_id"
         | 
| 674 | 
            +
                t.boolean  "is_default",                 :default => false
         | 
| 675 | 
            +
                t.datetime "created_at",                                    :null => false
         | 
| 676 | 
            +
                t.datetime "updated_at",                                    :null => false
         | 
| 677 | 
            +
              end
         | 
| 678 | 
            +
             | 
| 679 | 
            +
              add_index "configuration_item_types_configuration_options", ["configuration_item_type_id"], :name => "conf_item_type_conf_opt_id_item_idx"
         | 
| 680 | 
            +
              add_index "configuration_item_types_configuration_options", ["configuration_option_id"], :name => "conf_item_type_conf_opt_id_opt_idx"
         | 
| 681 | 
            +
             | 
| 682 | 
            +
              create_table "configuration_item_types_configurations", :id => false, :force => true do |t|
         | 
| 683 | 
            +
                t.integer "configuration_item_type_id"
         | 
| 684 | 
            +
                t.integer "configuration_id"
         | 
| 685 | 
            +
              end
         | 
| 686 | 
            +
             | 
| 687 | 
            +
              add_index "configuration_item_types_configurations", ["configuration_id"], :name => "conf_id_idx"
         | 
| 688 | 
            +
              add_index "configuration_item_types_configurations", ["configuration_item_type_id", "configuration_id"], :name => "conf_config_type_uniq_idx", :unique => true
         | 
| 689 | 
            +
              add_index "configuration_item_types_configurations", ["configuration_item_type_id"], :name => "conf_conf_type_id_item_idx"
         | 
| 690 | 
            +
             | 
| 691 | 
            +
              create_table "configuration_items", :force => true do |t|
         | 
| 692 | 
            +
                t.integer  "configuration_id"
         | 
| 693 | 
            +
                t.integer  "configuration_item_type_id"
         | 
| 694 | 
            +
                t.integer  "configuration_option_id"
         | 
| 695 | 
            +
                t.datetime "created_at",                 :null => false
         | 
| 696 | 
            +
                t.datetime "updated_at",                 :null => false
         | 
| 697 | 
            +
              end
         | 
| 698 | 
            +
             | 
| 699 | 
            +
              add_index "configuration_items", ["configuration_id"], :name => "index_configuration_items_on_configuration_id"
         | 
| 700 | 
            +
              add_index "configuration_items", ["configuration_item_type_id"], :name => "index_configuration_items_on_configuration_item_type_id"
         | 
| 701 | 
            +
              add_index "configuration_items", ["configuration_option_id"], :name => "index_configuration_items_on_configuration_option_id"
         | 
| 702 | 
            +
             | 
| 703 | 
            +
              create_table "configuration_items_configuration_options", :id => false, :force => true do |t|
         | 
| 704 | 
            +
                t.integer "configuration_item_id"
         | 
| 705 | 
            +
                t.integer "configuration_option_id"
         | 
| 706 | 
            +
              end
         | 
| 707 | 
            +
             | 
| 708 | 
            +
              add_index "configuration_items_configuration_options", ["configuration_item_id"], :name => "conf_item_conf_opt_id_item_idx"
         | 
| 709 | 
            +
              add_index "configuration_items_configuration_options", ["configuration_option_id"], :name => "conf_item_conf_opt_id_opt_idx"
         | 
| 710 | 
            +
             | 
| 711 | 
            +
              create_table "configuration_options", :force => true do |t|
         | 
| 712 | 
            +
                t.string   "description"
         | 
| 713 | 
            +
                t.string   "internal_identifier"
         | 
| 714 | 
            +
                t.string   "value"
         | 
| 715 | 
            +
                t.text     "comment"
         | 
| 716 | 
            +
                t.boolean  "user_defined",        :default => false
         | 
| 717 | 
            +
                t.datetime "created_at",                             :null => false
         | 
| 718 | 
            +
                t.datetime "updated_at",                             :null => false
         | 
| 719 | 
            +
              end
         | 
| 720 | 
            +
             | 
| 721 | 
            +
              add_index "configuration_options", ["internal_identifier"], :name => "index_configuration_options_on_internal_identifier"
         | 
| 722 | 
            +
              add_index "configuration_options", ["user_defined"], :name => "index_configuration_options_on_user_defined"
         | 
| 723 | 
            +
              add_index "configuration_options", ["value"], :name => "index_configuration_options_on_value"
         | 
| 724 | 
            +
             | 
| 725 | 
            +
              create_table "configurations", :force => true do |t|
         | 
| 726 | 
            +
                t.string   "description"
         | 
| 727 | 
            +
                t.string   "internal_identifier"
         | 
| 728 | 
            +
                t.boolean  "active"
         | 
| 729 | 
            +
                t.boolean  "is_template",         :default => false
         | 
| 730 | 
            +
                t.datetime "created_at",                             :null => false
         | 
| 731 | 
            +
                t.datetime "updated_at",                             :null => false
         | 
| 732 | 
            +
              end
         | 
| 733 | 
            +
             | 
| 734 | 
            +
              add_index "configurations", ["is_template"], :name => "index_configurations_on_is_template"
         | 
| 735 | 
            +
             | 
| 736 | 
            +
              create_table "contact_purposes", :force => true do |t|
         | 
| 737 | 
            +
                t.integer  "parent_id"
         | 
| 738 | 
            +
                t.integer  "lft"
         | 
| 739 | 
            +
                t.integer  "rgt"
         | 
| 740 | 
            +
                t.string   "description"
         | 
| 741 | 
            +
                t.string   "comments"
         | 
| 742 | 
            +
                t.string   "internal_identifier"
         | 
| 743 | 
            +
                t.string   "external_identifier"
         | 
| 744 | 
            +
                t.string   "external_id_source"
         | 
| 745 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 746 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 747 | 
            +
              end
         | 
| 748 | 
            +
             | 
| 749 | 
            +
              add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
         | 
| 750 | 
            +
             | 
| 751 | 
            +
              create_table "contact_purposes_contacts", :id => false, :force => true do |t|
         | 
| 752 | 
            +
                t.integer "contact_id"
         | 
| 753 | 
            +
                t.integer "contact_purpose_id"
         | 
| 754 | 
            +
              end
         | 
| 755 | 
            +
             | 
| 756 | 
            +
              add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
         | 
| 757 | 
            +
             | 
| 758 | 
            +
              create_table "contact_types", :force => true do |t|
         | 
| 759 | 
            +
                t.integer  "parent_id"
         | 
| 760 | 
            +
                t.integer  "lft"
         | 
| 761 | 
            +
                t.integer  "rgt"
         | 
| 762 | 
            +
                t.string   "description"
         | 
| 763 | 
            +
                t.string   "comments"
         | 
| 764 | 
            +
                t.string   "internal_identifier"
         | 
| 765 | 
            +
                t.string   "external_identifier"
         | 
| 766 | 
            +
                t.string   "external_id_source"
         | 
| 767 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 768 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 769 | 
            +
              end
         | 
| 770 | 
            +
             | 
| 771 | 
            +
              add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
         | 
| 772 | 
            +
             | 
| 773 | 
            +
              create_table "contacts", :force => true do |t|
         | 
| 774 | 
            +
                t.integer  "party_id"
         | 
| 775 | 
            +
                t.integer  "contact_mechanism_id"
         | 
| 776 | 
            +
                t.string   "contact_mechanism_type"
         | 
| 777 | 
            +
                t.string   "external_identifier"
         | 
| 778 | 
            +
                t.string   "external_id_source"
         | 
| 779 | 
            +
                t.datetime "created_at",             :null => false
         | 
| 780 | 
            +
                t.datetime "updated_at",             :null => false
         | 
| 781 | 
            +
              end
         | 
| 782 | 
            +
             | 
| 783 | 
            +
              add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
         | 
| 784 | 
            +
              add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
         | 
| 785 | 
            +
             | 
| 786 | 
            +
              create_table "credit_card_account_party_roles", :force => true do |t|
         | 
| 787 | 
            +
                t.integer  "credit_card_account_id"
         | 
| 788 | 
            +
                t.integer  "role_type_id"
         | 
| 789 | 
            +
                t.integer  "party_id"
         | 
| 790 | 
            +
                t.integer  "credit_card_id"
         | 
| 791 | 
            +
                t.datetime "created_at",             :null => false
         | 
| 792 | 
            +
                t.datetime "updated_at",             :null => false
         | 
| 793 | 
            +
              end
         | 
| 794 | 
            +
             | 
| 795 | 
            +
              add_index "credit_card_account_party_roles", ["credit_card_account_id"], :name => "index_credit_card_account_party_roles_on_credit_card_account_id"
         | 
| 796 | 
            +
              add_index "credit_card_account_party_roles", ["credit_card_id"], :name => "index_credit_card_account_party_roles_on_credit_card_id"
         | 
| 797 | 
            +
              add_index "credit_card_account_party_roles", ["party_id"], :name => "index_credit_card_account_party_roles_on_party_id"
         | 
| 798 | 
            +
              add_index "credit_card_account_party_roles", ["role_type_id"], :name => "index_credit_card_account_party_roles_on_role_type_id"
         | 
| 799 | 
            +
             | 
| 800 | 
            +
              create_table "credit_card_account_purposes", :force => true do |t|
         | 
| 801 | 
            +
                t.integer  "parent_id"
         | 
| 802 | 
            +
                t.integer  "lft"
         | 
| 803 | 
            +
                t.integer  "rgt"
         | 
| 804 | 
            +
                t.string   "description"
         | 
| 805 | 
            +
                t.string   "comments"
         | 
| 806 | 
            +
                t.string   "internal_identifier"
         | 
| 807 | 
            +
                t.string   "external_identifier"
         | 
| 808 | 
            +
                t.string   "external_id_source"
         | 
| 809 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 810 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 811 | 
            +
              end
         | 
| 812 | 
            +
             | 
| 813 | 
            +
              create_table "credit_card_accounts", :force => true do |t|
         | 
| 814 | 
            +
                t.datetime "created_at", :null => false
         | 
| 815 | 
            +
                t.datetime "updated_at", :null => false
         | 
| 816 | 
            +
              end
         | 
| 817 | 
            +
             | 
| 818 | 
            +
              create_table "credit_cards", :force => true do |t|
         | 
| 819 | 
            +
                t.string   "crypted_private_card_number"
         | 
| 820 | 
            +
                t.integer  "expiration_month"
         | 
| 821 | 
            +
                t.integer  "expiration_year"
         | 
| 822 | 
            +
                t.string   "description"
         | 
| 823 | 
            +
                t.string   "first_name_on_card"
         | 
| 824 | 
            +
                t.string   "last_name_on_card"
         | 
| 825 | 
            +
                t.string   "card_type"
         | 
| 826 | 
            +
                t.integer  "postal_address_id"
         | 
| 827 | 
            +
                t.integer  "credit_card_account_purpose_id"
         | 
| 828 | 
            +
                t.string   "credit_card_token"
         | 
| 829 | 
            +
                t.datetime "created_at",                     :null => false
         | 
| 830 | 
            +
                t.datetime "updated_at",                     :null => false
         | 
| 831 | 
            +
              end
         | 
| 832 | 
            +
             | 
| 833 | 
            +
              create_table "currencies", :force => true do |t|
         | 
| 834 | 
            +
                t.string   "name"
         | 
| 835 | 
            +
                t.string   "definition"
         | 
| 836 | 
            +
                t.string   "internal_identifier"
         | 
| 837 | 
            +
                t.string   "numeric_code"
         | 
| 838 | 
            +
                t.string   "major_unit_symbol"
         | 
| 839 | 
            +
                t.string   "minor_unit_symbol"
         | 
| 840 | 
            +
                t.string   "ratio_of_minor_unit_to_major_unit"
         | 
| 841 | 
            +
                t.string   "postfix_label"
         | 
| 842 | 
            +
                t.datetime "introduction_date"
         | 
| 843 | 
            +
                t.datetime "expiration_date"
         | 
| 844 | 
            +
                t.datetime "created_at",                        :null => false
         | 
| 845 | 
            +
                t.datetime "updated_at",                        :null => false
         | 
| 846 | 
            +
              end
         | 
| 847 | 
            +
             | 
| 848 | 
            +
              add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
         | 
| 849 | 
            +
             | 
| 850 | 
            +
              create_table "delayed_jobs", :force => true do |t|
         | 
| 851 | 
            +
                t.integer  "priority",   :default => 0
         | 
| 852 | 
            +
                t.integer  "attempts",   :default => 0
         | 
| 853 | 
            +
                t.text     "handler"
         | 
| 854 | 
            +
                t.text     "last_error"
         | 
| 855 | 
            +
                t.datetime "run_at"
         | 
| 856 | 
            +
                t.datetime "locked_at"
         | 
| 857 | 
            +
                t.datetime "failed_at"
         | 
| 858 | 
            +
                t.string   "locked_by"
         | 
| 859 | 
            +
                t.string   "queue"
         | 
| 860 | 
            +
                t.datetime "created_at",                :null => false
         | 
| 861 | 
            +
                t.datetime "updated_at",                :null => false
         | 
| 862 | 
            +
              end
         | 
| 863 | 
            +
             | 
| 864 | 
            +
              add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
         | 
| 865 | 
            +
             | 
| 866 | 
            +
              create_table "descriptive_assets", :force => true do |t|
         | 
| 867 | 
            +
                t.integer  "view_type_id"
         | 
| 868 | 
            +
                t.string   "internal_identifier"
         | 
| 869 | 
            +
                t.text     "description"
         | 
| 870 | 
            +
                t.string   "external_identifier"
         | 
| 871 | 
            +
                t.string   "external_id_source"
         | 
| 872 | 
            +
                t.integer  "described_record_id"
         | 
| 873 | 
            +
                t.string   "described_record_type"
         | 
| 874 | 
            +
                t.datetime "created_at",            :null => false
         | 
| 875 | 
            +
                t.datetime "updated_at",            :null => false
         | 
| 876 | 
            +
              end
         | 
| 877 | 
            +
             | 
| 878 | 
            +
              add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
         | 
| 879 | 
            +
              add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
         | 
| 880 | 
            +
             | 
| 881 | 
            +
              create_table "email_addresses", :force => true do |t|
         | 
| 882 | 
            +
                t.string   "email_address"
         | 
| 883 | 
            +
                t.string   "description"
         | 
| 884 | 
            +
                t.datetime "created_at",    :null => false
         | 
| 885 | 
            +
                t.datetime "updated_at",    :null => false
         | 
| 886 | 
            +
              end
         | 
| 887 | 
            +
             | 
| 888 | 
            +
              create_table "fee_types", :force => true do |t|
         | 
| 889 | 
            +
                t.string   "internal_identifier"
         | 
| 890 | 
            +
                t.string   "description"
         | 
| 891 | 
            +
                t.string   "comments"
         | 
| 892 | 
            +
                t.string   "external_identifier"
         | 
| 893 | 
            +
                t.string   "external_id_source"
         | 
| 894 | 
            +
                t.integer  "parent_id"
         | 
| 895 | 
            +
                t.integer  "lft"
         | 
| 896 | 
            +
                t.integer  "rgt"
         | 
| 897 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 898 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 899 | 
            +
              end
         | 
| 900 | 
            +
             | 
| 901 | 
            +
              create_table "fees", :force => true do |t|
         | 
| 902 | 
            +
                t.integer  "fee_record_id"
         | 
| 903 | 
            +
                t.string   "fee_record_type"
         | 
| 904 | 
            +
                t.integer  "money_id"
         | 
| 905 | 
            +
                t.integer  "fee_type_id"
         | 
| 906 | 
            +
                t.string   "description"
         | 
| 907 | 
            +
                t.datetime "start_date"
         | 
| 908 | 
            +
                t.datetime "end_date"
         | 
| 909 | 
            +
                t.string   "external_identifier"
         | 
| 910 | 
            +
                t.string   "external_id_source"
         | 
| 911 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 912 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 913 | 
            +
              end
         | 
| 914 | 
            +
             | 
| 915 | 
            +
              add_index "fees", ["fee_record_id", "fee_record_type"], :name => "fee_record_idx"
         | 
| 916 | 
            +
              add_index "fees", ["fee_type_id"], :name => "index_fees_on_fee_type_id"
         | 
| 917 | 
            +
              add_index "fees", ["money_id"], :name => "index_fees_on_money_id"
         | 
| 918 | 
            +
             | 
| 919 | 
            +
              create_table "file_assets", :force => true do |t|
         | 
| 920 | 
            +
                t.integer  "file_asset_holder_id"
         | 
| 921 | 
            +
                t.string   "file_asset_holder_type"
         | 
| 922 | 
            +
                t.string   "type"
         | 
| 923 | 
            +
                t.string   "name"
         | 
| 924 | 
            +
                t.string   "directory"
         | 
| 925 | 
            +
                t.string   "data_file_name"
         | 
| 926 | 
            +
                t.string   "data_content_type"
         | 
| 927 | 
            +
                t.integer  "data_file_size"
         | 
| 928 | 
            +
                t.datetime "data_updated_at"
         | 
| 929 | 
            +
                t.string   "width"
         | 
| 930 | 
            +
                t.string   "height"
         | 
| 931 | 
            +
                t.datetime "created_at",             :null => false
         | 
| 932 | 
            +
                t.datetime "updated_at",             :null => false
         | 
| 933 | 
            +
              end
         | 
| 934 | 
            +
             | 
| 935 | 
            +
              add_index "file_assets", ["directory"], :name => "index_file_assets_on_directory"
         | 
| 936 | 
            +
              add_index "file_assets", ["file_asset_holder_id", "file_asset_holder_type"], :name => "file_asset_holder_idx"
         | 
| 937 | 
            +
              add_index "file_assets", ["name"], :name => "index_file_assets_on_name"
         | 
| 938 | 
            +
              add_index "file_assets", ["type"], :name => "index_file_assets_on_type"
         | 
| 939 | 
            +
             | 
| 940 | 
            +
              create_table "financial_txn_accounts", :force => true do |t|
         | 
| 941 | 
            +
                t.string   "account_number"
         | 
| 942 | 
            +
                t.integer  "agreement_id"
         | 
| 943 | 
            +
                t.integer  "balance_id"
         | 
| 944 | 
            +
                t.date     "balance_date"
         | 
| 945 | 
            +
                t.boolean  "calculate_balance"
         | 
| 946 | 
            +
                t.integer  "payment_due_id"
         | 
| 947 | 
            +
                t.date     "due_date"
         | 
| 948 | 
            +
                t.integer  "financial_account_id"
         | 
| 949 | 
            +
                t.string   "financial_account_type"
         | 
| 950 | 
            +
                t.datetime "created_at",             :null => false
         | 
| 951 | 
            +
                t.datetime "updated_at",             :null => false
         | 
| 952 | 
            +
              end
         | 
| 953 | 
            +
             | 
| 954 | 
            +
              create_table "financial_txn_assns", :force => true do |t|
         | 
| 955 | 
            +
                t.integer  "financial_txn_id"
         | 
| 956 | 
            +
                t.integer  "financial_txn_record_id"
         | 
| 957 | 
            +
                t.string   "financial_txn_record_type"
         | 
| 958 | 
            +
                t.datetime "created_at",                :null => false
         | 
| 959 | 
            +
                t.datetime "updated_at",                :null => false
         | 
| 960 | 
            +
              end
         | 
| 961 | 
            +
             | 
| 962 | 
            +
              create_table "financial_txns", :force => true do |t|
         | 
| 963 | 
            +
                t.integer  "money_id"
         | 
| 964 | 
            +
                t.date     "apply_date"
         | 
| 965 | 
            +
                t.datetime "created_at", :null => false
         | 
| 966 | 
            +
                t.datetime "updated_at", :null => false
         | 
| 967 | 
            +
              end
         | 
| 968 | 
            +
             | 
| 969 | 
            +
              create_table "geo_countries", :force => true do |t|
         | 
| 970 | 
            +
                t.string   "name"
         | 
| 971 | 
            +
                t.string   "iso_code_2"
         | 
| 972 | 
            +
                t.string   "iso_code_3"
         | 
| 973 | 
            +
                t.boolean  "display",     :default => true
         | 
| 974 | 
            +
                t.integer  "external_id"
         | 
| 975 | 
            +
                t.datetime "created_at"
         | 
| 976 | 
            +
              end
         | 
| 977 | 
            +
             | 
| 978 | 
            +
              add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
         | 
| 979 | 
            +
              add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
         | 
| 980 | 
            +
             | 
| 981 | 
            +
              create_table "geo_zones", :force => true do |t|
         | 
| 982 | 
            +
                t.integer  "geo_country_id"
         | 
| 983 | 
            +
                t.string   "zone_code",      :default => "2"
         | 
| 984 | 
            +
                t.string   "zone_name"
         | 
| 985 | 
            +
                t.datetime "created_at"
         | 
| 986 | 
            +
              end
         | 
| 987 | 
            +
             | 
| 988 | 
            +
              add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
         | 
| 989 | 
            +
              add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
         | 
| 990 | 
            +
              add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
         | 
| 991 | 
            +
             | 
| 992 | 
            +
              create_table "groups", :force => true do |t|
         | 
| 993 | 
            +
                t.string   "description"
         | 
| 994 | 
            +
                t.datetime "created_at",  :null => false
         | 
| 995 | 
            +
                t.datetime "updated_at",  :null => false
         | 
| 996 | 
            +
              end
         | 
| 997 | 
            +
             | 
| 998 | 
            +
              create_table "individuals", :force => true do |t|
         | 
| 999 | 
            +
                t.integer  "party_id"
         | 
| 1000 | 
            +
                t.string   "current_last_name"
         | 
| 1001 | 
            +
                t.string   "current_first_name"
         | 
| 1002 | 
            +
                t.string   "current_middle_name"
         | 
| 1003 | 
            +
                t.string   "current_personal_title"
         | 
| 1004 | 
            +
                t.string   "current_suffix"
         | 
| 1005 | 
            +
                t.string   "current_nickname"
         | 
| 1006 | 
            +
                t.string   "gender",                       :limit => 1
         | 
| 1007 | 
            +
                t.date     "birth_date"
         | 
| 1008 | 
            +
                t.decimal  "height",                                    :precision => 5, :scale => 2
         | 
| 1009 | 
            +
                t.integer  "weight"
         | 
| 1010 | 
            +
                t.string   "mothers_maiden_name"
         | 
| 1011 | 
            +
                t.string   "marital_status",               :limit => 1
         | 
| 1012 | 
            +
                t.string   "social_security_number"
         | 
| 1013 | 
            +
                t.integer  "current_passport_number"
         | 
| 1014 | 
            +
                t.date     "current_passport_expire_date"
         | 
| 1015 | 
            +
                t.integer  "total_years_work_experience"
         | 
| 1016 | 
            +
                t.string   "comments"
         | 
| 1017 | 
            +
                t.string   "encrypted_ssn"
         | 
| 1018 | 
            +
                t.string   "temp_ssn"
         | 
| 1019 | 
            +
                t.string   "salt"
         | 
| 1020 | 
            +
                t.string   "ssn_last_four"
         | 
| 1021 | 
            +
                t.datetime "created_at",                                                              :null => false
         | 
| 1022 | 
            +
                t.datetime "updated_at",                                                              :null => false
         | 
| 1023 | 
            +
              end
         | 
| 1024 | 
            +
             | 
| 1025 | 
            +
              add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
         | 
| 1026 | 
            +
             | 
| 1027 | 
            +
              create_table "line_item_role_types", :force => true do |t|
         | 
| 1028 | 
            +
                t.integer  "parent_id"
         | 
| 1029 | 
            +
                t.integer  "lft"
         | 
| 1030 | 
            +
                t.integer  "rgt"
         | 
| 1031 | 
            +
                t.string   "description"
         | 
| 1032 | 
            +
                t.string   "comments"
         | 
| 1033 | 
            +
                t.string   "internal_identifier"
         | 
| 1034 | 
            +
                t.string   "external_identifier"
         | 
| 1035 | 
            +
                t.string   "external_id_source"
         | 
| 1036 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1037 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1038 | 
            +
              end
         | 
| 1039 | 
            +
             | 
| 1040 | 
            +
              add_index "line_item_role_types", ["parent_id"], :name => "index_line_item_role_types_on_parent_id"
         | 
| 1041 | 
            +
             | 
| 1042 | 
            +
              create_table "loyalty_program_codes", :force => true do |t|
         | 
| 1043 | 
            +
                t.string   "identifier"
         | 
| 1044 | 
            +
                t.string   "name"
         | 
| 1045 | 
            +
                t.string   "description"
         | 
| 1046 | 
            +
                t.datetime "created_at",  :null => false
         | 
| 1047 | 
            +
                t.datetime "updated_at",  :null => false
         | 
| 1048 | 
            +
              end
         | 
| 1049 | 
            +
             | 
| 1050 | 
            +
              create_table "money", :force => true do |t|
         | 
| 1051 | 
            +
                t.string   "description"
         | 
| 1052 | 
            +
                t.decimal  "amount",      :precision => 8, :scale => 2
         | 
| 1053 | 
            +
                t.integer  "currency_id"
         | 
| 1054 | 
            +
                t.datetime "created_at",                                :null => false
         | 
| 1055 | 
            +
                t.datetime "updated_at",                                :null => false
         | 
| 1056 | 
            +
              end
         | 
| 1057 | 
            +
             | 
| 1058 | 
            +
              add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
         | 
| 1059 | 
            +
             | 
| 1060 | 
            +
              create_table "note_types", :force => true do |t|
         | 
| 1061 | 
            +
                t.integer  "parent_id"
         | 
| 1062 | 
            +
                t.integer  "lft"
         | 
| 1063 | 
            +
                t.integer  "rgt"
         | 
| 1064 | 
            +
                t.string   "description"
         | 
| 1065 | 
            +
                t.string   "internal_identifier"
         | 
| 1066 | 
            +
                t.string   "external_identifier"
         | 
| 1067 | 
            +
                t.integer  "note_type_record_id"
         | 
| 1068 | 
            +
                t.string   "note_type_record_type"
         | 
| 1069 | 
            +
                t.datetime "created_at",            :null => false
         | 
| 1070 | 
            +
                t.datetime "updated_at",            :null => false
         | 
| 1071 | 
            +
              end
         | 
| 1072 | 
            +
             | 
| 1073 | 
            +
              add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
         | 
| 1074 | 
            +
             | 
| 1075 | 
            +
              create_table "notes", :force => true do |t|
         | 
| 1076 | 
            +
                t.integer  "created_by_id"
         | 
| 1077 | 
            +
                t.text     "content"
         | 
| 1078 | 
            +
                t.integer  "noted_record_id"
         | 
| 1079 | 
            +
                t.string   "noted_record_type"
         | 
| 1080 | 
            +
                t.integer  "note_type_id"
         | 
| 1081 | 
            +
                t.datetime "created_at",        :null => false
         | 
| 1082 | 
            +
                t.datetime "updated_at",        :null => false
         | 
| 1083 | 
            +
              end
         | 
| 1084 | 
            +
             | 
| 1085 | 
            +
              add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
         | 
| 1086 | 
            +
              add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
         | 
| 1087 | 
            +
              add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
         | 
| 1088 | 
            +
             | 
| 1089 | 
            +
              create_table "order_line_item_pty_roles", :force => true do |t|
         | 
| 1090 | 
            +
                t.string   "description"
         | 
| 1091 | 
            +
                t.integer  "order_line_item_id"
         | 
| 1092 | 
            +
                t.integer  "party_id"
         | 
| 1093 | 
            +
                t.integer  "line_item_role_type_id"
         | 
| 1094 | 
            +
                t.integer  "biz_txn_acct_root_id"
         | 
| 1095 | 
            +
                t.datetime "created_at",             :null => false
         | 
| 1096 | 
            +
                t.datetime "updated_at",             :null => false
         | 
| 1097 | 
            +
              end
         | 
| 1098 | 
            +
             | 
| 1099 | 
            +
              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"
         | 
| 1100 | 
            +
              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"
         | 
| 1101 | 
            +
              add_index "order_line_item_pty_roles", ["order_line_item_id"], :name => "index_order_line_item_pty_roles_on_order_line_item_id"
         | 
| 1102 | 
            +
              add_index "order_line_item_pty_roles", ["party_id"], :name => "index_order_line_item_pty_roles_on_party_id"
         | 
| 1103 | 
            +
             | 
| 1104 | 
            +
              create_table "order_line_item_types", :force => true do |t|
         | 
| 1105 | 
            +
                t.integer  "parent_id"
         | 
| 1106 | 
            +
                t.integer  "lft"
         | 
| 1107 | 
            +
                t.integer  "rgt"
         | 
| 1108 | 
            +
                t.string   "description"
         | 
| 1109 | 
            +
                t.string   "comments"
         | 
| 1110 | 
            +
                t.string   "internal_identifier"
         | 
| 1111 | 
            +
                t.string   "external_identifier"
         | 
| 1112 | 
            +
                t.string   "external_id_source"
         | 
| 1113 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1114 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1115 | 
            +
              end
         | 
| 1116 | 
            +
             | 
| 1117 | 
            +
              add_index "order_line_item_types", ["parent_id"], :name => "index_order_line_item_types_on_parent_id"
         | 
| 1118 | 
            +
             | 
| 1119 | 
            +
              create_table "order_line_items", :force => true do |t|
         | 
| 1120 | 
            +
                t.integer  "order_txn_id"
         | 
| 1121 | 
            +
                t.integer  "order_line_item_type_id"
         | 
| 1122 | 
            +
                t.integer  "product_id"
         | 
| 1123 | 
            +
                t.string   "product_description"
         | 
| 1124 | 
            +
                t.integer  "product_instance_id"
         | 
| 1125 | 
            +
                t.string   "product_instance_description"
         | 
| 1126 | 
            +
                t.integer  "product_type_id"
         | 
| 1127 | 
            +
                t.string   "product_type_description"
         | 
| 1128 | 
            +
                t.decimal  "sold_price",                   :precision => 8, :scale => 2
         | 
| 1129 | 
            +
                t.integer  "sold_price_uom"
         | 
| 1130 | 
            +
                t.integer  "sold_amount"
         | 
| 1131 | 
            +
                t.integer  "sold_amount_uom"
         | 
| 1132 | 
            +
                t.integer  "product_offer_id"
         | 
| 1133 | 
            +
                t.datetime "created_at",                                                 :null => false
         | 
| 1134 | 
            +
                t.datetime "updated_at",                                                 :null => false
         | 
| 1135 | 
            +
              end
         | 
| 1136 | 
            +
             | 
| 1137 | 
            +
              add_index "order_line_items", ["order_line_item_type_id"], :name => "index_order_line_items_on_order_line_item_type_id"
         | 
| 1138 | 
            +
              add_index "order_line_items", ["order_txn_id"], :name => "index_order_line_items_on_order_txn_id"
         | 
| 1139 | 
            +
              add_index "order_line_items", ["product_id"], :name => "index_order_line_items_on_product_id"
         | 
| 1140 | 
            +
              add_index "order_line_items", ["product_instance_id"], :name => "index_order_line_items_on_product_instance_id"
         | 
| 1141 | 
            +
              add_index "order_line_items", ["product_offer_id"], :name => "index_order_line_items_on_product_offer_id"
         | 
| 1142 | 
            +
              add_index "order_line_items", ["product_type_id"], :name => "index_order_line_items_on_product_type_id"
         | 
| 1143 | 
            +
             | 
| 1144 | 
            +
              create_table "order_txn_types", :force => true do |t|
         | 
| 1145 | 
            +
                t.integer  "parent_id"
         | 
| 1146 | 
            +
                t.integer  "lft"
         | 
| 1147 | 
            +
                t.integer  "rgt"
         | 
| 1148 | 
            +
                t.string   "description"
         | 
| 1149 | 
            +
                t.string   "comments"
         | 
| 1150 | 
            +
                t.string   "internal_identifier"
         | 
| 1151 | 
            +
                t.string   "external_identifier"
         | 
| 1152 | 
            +
                t.string   "external_id_source"
         | 
| 1153 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1154 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1155 | 
            +
              end
         | 
| 1156 | 
            +
             | 
| 1157 | 
            +
              add_index "order_txn_types", ["parent_id"], :name => "index_order_txn_types_on_parent_id"
         | 
| 1158 | 
            +
             | 
| 1159 | 
            +
              create_table "order_txns", :force => true do |t|
         | 
| 1160 | 
            +
                t.string   "state_machine"
         | 
| 1161 | 
            +
                t.string   "description"
         | 
| 1162 | 
            +
                t.integer  "order_txn_type_id"
         | 
| 1163 | 
            +
                t.string   "email"
         | 
| 1164 | 
            +
                t.string   "phone_number"
         | 
| 1165 | 
            +
                t.string   "ship_to_first_name"
         | 
| 1166 | 
            +
                t.string   "ship_to_last_name"
         | 
| 1167 | 
            +
                t.string   "ship_to_address_line_1"
         | 
| 1168 | 
            +
                t.string   "ship_to_address_line_2"
         | 
| 1169 | 
            +
                t.string   "bill_to_address_line_1"
         | 
| 1170 | 
            +
                t.string   "bill_to_address_line_2"
         | 
| 1171 | 
            +
                t.string   "ship_to_city"
         | 
| 1172 | 
            +
                t.string   "ship_to_state"
         | 
| 1173 | 
            +
                t.string   "ship_to_postal_code"
         | 
| 1174 | 
            +
                t.string   "ship_to_country_name"
         | 
| 1175 | 
            +
                t.string   "customer_ip"
         | 
| 1176 | 
            +
                t.integer  "order_number"
         | 
| 1177 | 
            +
                t.string   "status"
         | 
| 1178 | 
            +
                t.string   "error_message"
         | 
| 1179 | 
            +
                t.integer  "order_txn_record_id"
         | 
| 1180 | 
            +
                t.string   "order_txn_record_type"
         | 
| 1181 | 
            +
                t.datetime "created_at",             :null => false
         | 
| 1182 | 
            +
                t.datetime "updated_at",             :null => false
         | 
| 1183 | 
            +
                t.string   "payment_gateway_txn_id"
         | 
| 1184 | 
            +
                t.integer  "credit_card_id"
         | 
| 1185 | 
            +
                t.string   "bill_to_first_name"
         | 
| 1186 | 
            +
                t.string   "bill_to_last_name"
         | 
| 1187 | 
            +
                t.string   "bill_to_city"
         | 
| 1188 | 
            +
                t.string   "bill_to_state"
         | 
| 1189 | 
            +
                t.string   "bill_to_postal_code"
         | 
| 1190 | 
            +
                t.string   "bill_to_country_name"
         | 
| 1191 | 
            +
                t.string   "bill_to_country"
         | 
| 1192 | 
            +
                t.string   "ship_to_country"
         | 
| 1193 | 
            +
              end
         | 
| 1194 | 
            +
             | 
| 1195 | 
            +
              add_index "order_txns", ["order_txn_record_id", "order_txn_record_type"], :name => "order_txn_record_idx"
         | 
| 1196 | 
            +
              add_index "order_txns", ["order_txn_type_id"], :name => "index_order_txns_on_order_txn_type_id"
         | 
| 1197 | 
            +
             | 
| 1198 | 
            +
              create_table "organizations", :force => true do |t|
         | 
| 1199 | 
            +
                t.string   "description"
         | 
| 1200 | 
            +
                t.string   "tax_id_number"
         | 
| 1201 | 
            +
                t.datetime "created_at",    :null => false
         | 
| 1202 | 
            +
                t.datetime "updated_at",    :null => false
         | 
| 1203 | 
            +
              end
         | 
| 1204 | 
            +
             | 
| 1205 | 
            +
              create_table "parties", :force => true do |t|
         | 
| 1206 | 
            +
                t.string   "description"
         | 
| 1207 | 
            +
                t.integer  "business_party_id"
         | 
| 1208 | 
            +
                t.string   "business_party_type"
         | 
| 1209 | 
            +
                t.integer  "list_view_image_id"
         | 
| 1210 | 
            +
                t.string   "enterprise_identifier"
         | 
| 1211 | 
            +
                t.datetime "created_at",            :null => false
         | 
| 1212 | 
            +
                t.datetime "updated_at",            :null => false
         | 
| 1213 | 
            +
              end
         | 
| 1214 | 
            +
             | 
| 1215 | 
            +
              add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
         | 
| 1216 | 
            +
             | 
| 1217 | 
            +
              create_table "parties_security_roles", :id => false, :force => true do |t|
         | 
| 1218 | 
            +
                t.integer "party_id"
         | 
| 1219 | 
            +
                t.integer "security_role_id"
         | 
| 1220 | 
            +
              end
         | 
| 1221 | 
            +
             | 
| 1222 | 
            +
              add_index "parties_security_roles", ["party_id"], :name => "index_parties_security_roles_on_party_id"
         | 
| 1223 | 
            +
              add_index "parties_security_roles", ["security_role_id"], :name => "index_parties_security_roles_on_security_role_id"
         | 
| 1224 | 
            +
             | 
| 1225 | 
            +
              create_table "party_relationships", :force => true do |t|
         | 
| 1226 | 
            +
                t.string   "description"
         | 
| 1227 | 
            +
                t.integer  "party_id_from"
         | 
| 1228 | 
            +
                t.integer  "party_id_to"
         | 
| 1229 | 
            +
                t.integer  "role_type_id_from"
         | 
| 1230 | 
            +
                t.integer  "role_type_id_to"
         | 
| 1231 | 
            +
                t.integer  "status_type_id"
         | 
| 1232 | 
            +
                t.integer  "priority_type_id"
         | 
| 1233 | 
            +
                t.integer  "relationship_type_id"
         | 
| 1234 | 
            +
                t.date     "from_date"
         | 
| 1235 | 
            +
                t.date     "thru_date"
         | 
| 1236 | 
            +
                t.string   "external_identifier"
         | 
| 1237 | 
            +
                t.string   "external_id_source"
         | 
| 1238 | 
            +
                t.datetime "created_at",           :null => false
         | 
| 1239 | 
            +
                t.datetime "updated_at",           :null => false
         | 
| 1240 | 
            +
              end
         | 
| 1241 | 
            +
             | 
| 1242 | 
            +
              add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
         | 
| 1243 | 
            +
              add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
         | 
| 1244 | 
            +
              add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
         | 
| 1245 | 
            +
             | 
| 1246 | 
            +
              create_table "party_roles", :force => true do |t|
         | 
| 1247 | 
            +
                t.string   "type"
         | 
| 1248 | 
            +
                t.integer  "party_id"
         | 
| 1249 | 
            +
                t.integer  "role_type_id"
         | 
| 1250 | 
            +
                t.datetime "created_at",   :null => false
         | 
| 1251 | 
            +
                t.datetime "updated_at",   :null => false
         | 
| 1252 | 
            +
              end
         | 
| 1253 | 
            +
             | 
| 1254 | 
            +
              add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
         | 
| 1255 | 
            +
              add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
         | 
| 1256 | 
            +
             | 
| 1257 | 
            +
              create_table "party_search_facts", :force => true do |t|
         | 
| 1258 | 
            +
                t.integer  "party_id"
         | 
| 1259 | 
            +
                t.string   "eid"
         | 
| 1260 | 
            +
                t.string   "type"
         | 
| 1261 | 
            +
                t.text     "roles"
         | 
| 1262 | 
            +
                t.string   "party_description"
         | 
| 1263 | 
            +
                t.string   "party_business_party_type"
         | 
| 1264 | 
            +
                t.string   "user_login"
         | 
| 1265 | 
            +
                t.string   "individual_current_last_name"
         | 
| 1266 | 
            +
                t.string   "individual_current_first_name"
         | 
| 1267 | 
            +
                t.string   "individual_current_middle_name"
         | 
| 1268 | 
            +
                t.string   "individual_birth_date"
         | 
| 1269 | 
            +
                t.string   "individual_ssn"
         | 
| 1270 | 
            +
                t.string   "party_phone_number"
         | 
| 1271 | 
            +
                t.string   "party_email_address"
         | 
| 1272 | 
            +
                t.string   "party_address_1"
         | 
| 1273 | 
            +
                t.string   "party_address_2"
         | 
| 1274 | 
            +
                t.string   "party_primary_address_city"
         | 
| 1275 | 
            +
                t.string   "party_primary_address_state"
         | 
| 1276 | 
            +
                t.string   "party_primary_address_zip"
         | 
| 1277 | 
            +
                t.string   "party_primary_address_country"
         | 
| 1278 | 
            +
                t.boolean  "user_enabled"
         | 
| 1279 | 
            +
                t.string   "user_type"
         | 
| 1280 | 
            +
                t.boolean  "reindex"
         | 
| 1281 | 
            +
                t.datetime "created_at",                     :null => false
         | 
| 1282 | 
            +
                t.datetime "updated_at",                     :null => false
         | 
| 1283 | 
            +
              end
         | 
| 1284 | 
            +
             | 
| 1285 | 
            +
              create_table "payment_gateway_actions", :force => true do |t|
         | 
| 1286 | 
            +
                t.string   "internal_identifier"
         | 
| 1287 | 
            +
                t.string   "description"
         | 
| 1288 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1289 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1290 | 
            +
              end
         | 
| 1291 | 
            +
             | 
| 1292 | 
            +
              add_index "payment_gateway_actions", ["internal_identifier"], :name => "index_payment_gateway_actions_on_internal_identifier"
         | 
| 1293 | 
            +
             | 
| 1294 | 
            +
              create_table "payment_gateways", :force => true do |t|
         | 
| 1295 | 
            +
                t.string   "params"
         | 
| 1296 | 
            +
                t.integer  "payment_gateway_action_id"
         | 
| 1297 | 
            +
                t.integer  "payment_id"
         | 
| 1298 | 
            +
                t.string   "response"
         | 
| 1299 | 
            +
                t.datetime "created_at",                :null => false
         | 
| 1300 | 
            +
                t.datetime "updated_at",                :null => false
         | 
| 1301 | 
            +
              end
         | 
| 1302 | 
            +
             | 
| 1303 | 
            +
              create_table "payments", :force => true do |t|
         | 
| 1304 | 
            +
                t.boolean  "success"
         | 
| 1305 | 
            +
                t.string   "reference_number"
         | 
| 1306 | 
            +
                t.integer  "financial_txn_id"
         | 
| 1307 | 
            +
                t.string   "current_state"
         | 
| 1308 | 
            +
                t.string   "authorization_code"
         | 
| 1309 | 
            +
                t.string   "external_identifier"
         | 
| 1310 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1311 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1312 | 
            +
              end
         | 
| 1313 | 
            +
             | 
| 1314 | 
            +
              add_index "payments", ["financial_txn_id"], :name => "index_payments_on_financial_txn_id"
         | 
| 1315 | 
            +
             | 
| 1316 | 
            +
              create_table "phone_numbers", :force => true do |t|
         | 
| 1317 | 
            +
                t.string   "phone_number"
         | 
| 1318 | 
            +
                t.string   "description"
         | 
| 1319 | 
            +
                t.datetime "created_at",   :null => false
         | 
| 1320 | 
            +
                t.datetime "updated_at",   :null => false
         | 
| 1321 | 
            +
              end
         | 
| 1322 | 
            +
             | 
| 1323 | 
            +
              create_table "postal_addresses", :force => true do |t|
         | 
| 1324 | 
            +
                t.string   "address_line_1"
         | 
| 1325 | 
            +
                t.string   "address_line_2"
         | 
| 1326 | 
            +
                t.string   "city"
         | 
| 1327 | 
            +
                t.string   "state"
         | 
| 1328 | 
            +
                t.string   "zip"
         | 
| 1329 | 
            +
                t.string   "country"
         | 
| 1330 | 
            +
                t.string   "description"
         | 
| 1331 | 
            +
                t.integer  "geo_country_id"
         | 
| 1332 | 
            +
                t.integer  "geo_zone_id"
         | 
| 1333 | 
            +
                t.datetime "created_at",     :null => false
         | 
| 1334 | 
            +
                t.datetime "updated_at",     :null => false
         | 
| 1335 | 
            +
              end
         | 
| 1336 | 
            +
             | 
| 1337 | 
            +
              add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
         | 
| 1338 | 
            +
              add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
         | 
| 1339 | 
            +
             | 
| 1340 | 
            +
              create_table "preference_options", :force => true do |t|
         | 
| 1341 | 
            +
                t.string   "description"
         | 
| 1342 | 
            +
                t.string   "internal_identifier"
         | 
| 1343 | 
            +
                t.string   "value"
         | 
| 1344 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1345 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1346 | 
            +
              end
         | 
| 1347 | 
            +
             | 
| 1348 | 
            +
              create_table "preference_options_preference_types", :id => false, :force => true do |t|
         | 
| 1349 | 
            +
                t.integer "preference_type_id"
         | 
| 1350 | 
            +
                t.integer "preference_option_id"
         | 
| 1351 | 
            +
              end
         | 
| 1352 | 
            +
             | 
| 1353 | 
            +
              add_index "preference_options_preference_types", ["preference_option_id"], :name => "pref_opt_pref_type_pref_opt_id_idx"
         | 
| 1354 | 
            +
              add_index "preference_options_preference_types", ["preference_type_id"], :name => "pref_opt_pref_type_pref_type_id_idx"
         | 
| 1355 | 
            +
             | 
| 1356 | 
            +
              create_table "preference_types", :force => true do |t|
         | 
| 1357 | 
            +
                t.string   "description"
         | 
| 1358 | 
            +
                t.string   "internal_identifier"
         | 
| 1359 | 
            +
                t.integer  "default_pref_option_id"
         | 
| 1360 | 
            +
                t.datetime "created_at",             :null => false
         | 
| 1361 | 
            +
                t.datetime "updated_at",             :null => false
         | 
| 1362 | 
            +
              end
         | 
| 1363 | 
            +
             | 
| 1364 | 
            +
              add_index "preference_types", ["default_pref_option_id"], :name => "index_preference_types_on_default_pref_option_id"
         | 
| 1365 | 
            +
             | 
| 1366 | 
            +
              create_table "preferences", :force => true do |t|
         | 
| 1367 | 
            +
                t.integer  "preference_option_id"
         | 
| 1368 | 
            +
                t.integer  "preference_type_id"
         | 
| 1369 | 
            +
                t.datetime "created_at",           :null => false
         | 
| 1370 | 
            +
                t.datetime "updated_at",           :null => false
         | 
| 1371 | 
            +
              end
         | 
| 1372 | 
            +
             | 
| 1373 | 
            +
              add_index "preferences", ["preference_option_id"], :name => "index_preferences_on_preference_option_id"
         | 
| 1374 | 
            +
              add_index "preferences", ["preference_type_id"], :name => "index_preferences_on_preference_type_id"
         | 
| 1375 | 
            +
             | 
| 1376 | 
            +
              create_table "price_component_types", :force => true do |t|
         | 
| 1377 | 
            +
                t.string   "description"
         | 
| 1378 | 
            +
                t.string   "internal_identifier"
         | 
| 1379 | 
            +
                t.string   "external_identifier"
         | 
| 1380 | 
            +
                t.string   "external_id_source"
         | 
| 1381 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1382 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1383 | 
            +
              end
         | 
| 1384 | 
            +
             | 
| 1385 | 
            +
              create_table "price_components", :force => true do |t|
         | 
| 1386 | 
            +
                t.string   "description"
         | 
| 1387 | 
            +
                t.integer  "pricing_plan_component_id"
         | 
| 1388 | 
            +
                t.integer  "price_id"
         | 
| 1389 | 
            +
                t.integer  "money_id"
         | 
| 1390 | 
            +
                t.integer  "priced_component_id"
         | 
| 1391 | 
            +
                t.string   "priced_component_type"
         | 
| 1392 | 
            +
                t.datetime "created_at",                :null => false
         | 
| 1393 | 
            +
                t.datetime "updated_at",                :null => false
         | 
| 1394 | 
            +
              end
         | 
| 1395 | 
            +
             | 
| 1396 | 
            +
              add_index "price_components", ["money_id"], :name => "index_price_components_on_money_id"
         | 
| 1397 | 
            +
              add_index "price_components", ["price_id"], :name => "index_price_components_on_price_id"
         | 
| 1398 | 
            +
              add_index "price_components", ["priced_component_id", "priced_component_type"], :name => "priced_component_idx"
         | 
| 1399 | 
            +
              add_index "price_components", ["pricing_plan_component_id"], :name => "index_price_components_on_pricing_plan_component_id"
         | 
| 1400 | 
            +
             | 
| 1401 | 
            +
              create_table "prices", :force => true do |t|
         | 
| 1402 | 
            +
                t.string   "description"
         | 
| 1403 | 
            +
                t.integer  "priced_item_id"
         | 
| 1404 | 
            +
                t.string   "priced_item_type"
         | 
| 1405 | 
            +
                t.integer  "pricing_plan_id"
         | 
| 1406 | 
            +
                t.integer  "money_id"
         | 
| 1407 | 
            +
                t.datetime "created_at",       :null => false
         | 
| 1408 | 
            +
                t.datetime "updated_at",       :null => false
         | 
| 1409 | 
            +
              end
         | 
| 1410 | 
            +
             | 
| 1411 | 
            +
              add_index "prices", ["money_id"], :name => "index_prices_on_money_id"
         | 
| 1412 | 
            +
              add_index "prices", ["priced_item_id", "priced_item_type"], :name => "priced_item_idx"
         | 
| 1413 | 
            +
              add_index "prices", ["pricing_plan_id"], :name => "index_prices_on_pricing_plan_id"
         | 
| 1414 | 
            +
             | 
| 1415 | 
            +
              create_table "pricing_plan_assignments", :force => true do |t|
         | 
| 1416 | 
            +
                t.integer  "pricing_plan_id"
         | 
| 1417 | 
            +
                t.integer  "priceable_item_id"
         | 
| 1418 | 
            +
                t.string   "priceable_item_type"
         | 
| 1419 | 
            +
                t.integer  "priority"
         | 
| 1420 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1421 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1422 | 
            +
              end
         | 
| 1423 | 
            +
             | 
| 1424 | 
            +
              add_index "pricing_plan_assignments", ["priceable_item_id", "priceable_item_type"], :name => "priceable_item_idx"
         | 
| 1425 | 
            +
              add_index "pricing_plan_assignments", ["pricing_plan_id"], :name => "index_pricing_plan_assignments_on_pricing_plan_id"
         | 
| 1426 | 
            +
             | 
| 1427 | 
            +
              create_table "pricing_plan_components", :force => true do |t|
         | 
| 1428 | 
            +
                t.integer  "price_component_type_id"
         | 
| 1429 | 
            +
                t.string   "description"
         | 
| 1430 | 
            +
                t.string   "comments"
         | 
| 1431 | 
            +
                t.string   "internal_identifier"
         | 
| 1432 | 
            +
                t.string   "external_identifier"
         | 
| 1433 | 
            +
                t.string   "external_id_source"
         | 
| 1434 | 
            +
                t.string   "matching_rules"
         | 
| 1435 | 
            +
                t.string   "pricing_calculation"
         | 
| 1436 | 
            +
                t.boolean  "is_simple_amount"
         | 
| 1437 | 
            +
                t.integer  "currency_id"
         | 
| 1438 | 
            +
                t.decimal  "money_amount",            :precision => 8, :scale => 2
         | 
| 1439 | 
            +
                t.datetime "created_at",                                            :null => false
         | 
| 1440 | 
            +
                t.datetime "updated_at",                                            :null => false
         | 
| 1441 | 
            +
              end
         | 
| 1442 | 
            +
             | 
| 1443 | 
            +
              add_index "pricing_plan_components", ["price_component_type_id"], :name => "index_pricing_plan_components_on_price_component_type_id"
         | 
| 1444 | 
            +
             | 
| 1445 | 
            +
              create_table "pricing_plans", :force => true do |t|
         | 
| 1446 | 
            +
                t.string   "description"
         | 
| 1447 | 
            +
                t.string   "comments"
         | 
| 1448 | 
            +
                t.string   "internal_identifier"
         | 
| 1449 | 
            +
                t.string   "external_identifier"
         | 
| 1450 | 
            +
                t.string   "external_id_source"
         | 
| 1451 | 
            +
                t.date     "from_date"
         | 
| 1452 | 
            +
                t.date     "thru_date"
         | 
| 1453 | 
            +
                t.string   "matching_rules"
         | 
| 1454 | 
            +
                t.string   "pricing_calculation"
         | 
| 1455 | 
            +
                t.boolean  "is_simple_amount"
         | 
| 1456 | 
            +
                t.integer  "currency_id"
         | 
| 1457 | 
            +
                t.decimal  "money_amount",        :precision => 8, :scale => 2
         | 
| 1458 | 
            +
                t.datetime "created_at",                                        :null => false
         | 
| 1459 | 
            +
                t.datetime "updated_at",                                        :null => false
         | 
| 1460 | 
            +
              end
         | 
| 1461 | 
            +
             | 
| 1462 | 
            +
              create_table "prod_availability_status_types", :force => true do |t|
         | 
| 1463 | 
            +
                t.integer  "parent_id"
         | 
| 1464 | 
            +
                t.integer  "lft"
         | 
| 1465 | 
            +
                t.integer  "rgt"
         | 
| 1466 | 
            +
                t.string   "description"
         | 
| 1467 | 
            +
                t.string   "internal_identifier"
         | 
| 1468 | 
            +
                t.string   "external_identifier"
         | 
| 1469 | 
            +
                t.string   "external_id_source"
         | 
| 1470 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1471 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1472 | 
            +
              end
         | 
| 1473 | 
            +
             | 
| 1474 | 
            +
              create_table "prod_instance_reln_types", :force => true do |t|
         | 
| 1475 | 
            +
                t.integer  "parent_id"
         | 
| 1476 | 
            +
                t.integer  "lft"
         | 
| 1477 | 
            +
                t.integer  "rgt"
         | 
| 1478 | 
            +
                t.string   "description"
         | 
| 1479 | 
            +
                t.string   "comments"
         | 
| 1480 | 
            +
                t.string   "internal_identifier"
         | 
| 1481 | 
            +
                t.string   "external_identifier"
         | 
| 1482 | 
            +
                t.string   "external_id_source"
         | 
| 1483 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1484 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1485 | 
            +
              end
         | 
| 1486 | 
            +
             | 
| 1487 | 
            +
              add_index "prod_instance_reln_types", ["parent_id"], :name => "index_prod_instance_reln_types_on_parent_id"
         | 
| 1488 | 
            +
             | 
| 1489 | 
            +
              create_table "prod_instance_relns", :force => true do |t|
         | 
| 1490 | 
            +
                t.integer  "prod_instance_reln_type_id"
         | 
| 1491 | 
            +
                t.string   "description"
         | 
| 1492 | 
            +
                t.integer  "prod_instance_id_from"
         | 
| 1493 | 
            +
                t.integer  "prod_instance_id_to"
         | 
| 1494 | 
            +
                t.integer  "role_type_id_from"
         | 
| 1495 | 
            +
                t.integer  "role_type_id_to"
         | 
| 1496 | 
            +
                t.integer  "status_type_id"
         | 
| 1497 | 
            +
                t.date     "from_date"
         | 
| 1498 | 
            +
                t.date     "thru_date"
         | 
| 1499 | 
            +
                t.datetime "created_at",                 :null => false
         | 
| 1500 | 
            +
                t.datetime "updated_at",                 :null => false
         | 
| 1501 | 
            +
              end
         | 
| 1502 | 
            +
             | 
| 1503 | 
            +
              add_index "prod_instance_relns", ["prod_instance_reln_type_id"], :name => "index_prod_instance_relns_on_prod_instance_reln_type_id"
         | 
| 1504 | 
            +
              add_index "prod_instance_relns", ["status_type_id"], :name => "index_prod_instance_relns_on_status_type_id"
         | 
| 1505 | 
            +
             | 
| 1506 | 
            +
              create_table "prod_instance_role_types", :force => true do |t|
         | 
| 1507 | 
            +
                t.integer  "parent_id"
         | 
| 1508 | 
            +
                t.integer  "lft"
         | 
| 1509 | 
            +
                t.integer  "rgt"
         | 
| 1510 | 
            +
                t.string   "description"
         | 
| 1511 | 
            +
                t.string   "comments"
         | 
| 1512 | 
            +
                t.string   "internal_identifier"
         | 
| 1513 | 
            +
                t.string   "external_identifier"
         | 
| 1514 | 
            +
                t.string   "external_id_source"
         | 
| 1515 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1516 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1517 | 
            +
              end
         | 
| 1518 | 
            +
             | 
| 1519 | 
            +
              add_index "prod_instance_role_types", ["parent_id"], :name => "index_prod_instance_role_types_on_parent_id"
         | 
| 1520 | 
            +
             | 
| 1521 | 
            +
              create_table "prod_type_reln_types", :force => true do |t|
         | 
| 1522 | 
            +
                t.integer  "parent_id"
         | 
| 1523 | 
            +
                t.integer  "lft"
         | 
| 1524 | 
            +
                t.integer  "rgt"
         | 
| 1525 | 
            +
                t.string   "description"
         | 
| 1526 | 
            +
                t.string   "comments"
         | 
| 1527 | 
            +
                t.string   "internal_identifier"
         | 
| 1528 | 
            +
                t.string   "external_identifier"
         | 
| 1529 | 
            +
                t.string   "external_id_source"
         | 
| 1530 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1531 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1532 | 
            +
              end
         | 
| 1533 | 
            +
             | 
| 1534 | 
            +
              add_index "prod_type_reln_types", ["parent_id"], :name => "index_prod_type_reln_types_on_parent_id"
         | 
| 1535 | 
            +
             | 
| 1536 | 
            +
              create_table "prod_type_relns", :force => true do |t|
         | 
| 1537 | 
            +
                t.integer  "prod_type_reln_type_id"
         | 
| 1538 | 
            +
                t.string   "description"
         | 
| 1539 | 
            +
                t.integer  "prod_type_id_from"
         | 
| 1540 | 
            +
                t.integer  "prod_type_id_to"
         | 
| 1541 | 
            +
                t.integer  "role_type_id_from"
         | 
| 1542 | 
            +
                t.integer  "role_type_id_to"
         | 
| 1543 | 
            +
                t.integer  "status_type_id"
         | 
| 1544 | 
            +
                t.date     "from_date"
         | 
| 1545 | 
            +
                t.date     "thru_date"
         | 
| 1546 | 
            +
                t.datetime "created_at",             :null => false
         | 
| 1547 | 
            +
                t.datetime "updated_at",             :null => false
         | 
| 1548 | 
            +
              end
         | 
| 1549 | 
            +
             | 
| 1550 | 
            +
              add_index "prod_type_relns", ["prod_type_reln_type_id"], :name => "index_prod_type_relns_on_prod_type_reln_type_id"
         | 
| 1551 | 
            +
              add_index "prod_type_relns", ["status_type_id"], :name => "index_prod_type_relns_on_status_type_id"
         | 
| 1552 | 
            +
             | 
| 1553 | 
            +
              create_table "prod_type_role_types", :force => true do |t|
         | 
| 1554 | 
            +
                t.integer  "parent_id"
         | 
| 1555 | 
            +
                t.integer  "lft"
         | 
| 1556 | 
            +
                t.integer  "rgt"
         | 
| 1557 | 
            +
                t.string   "description"
         | 
| 1558 | 
            +
                t.string   "comments"
         | 
| 1559 | 
            +
                t.string   "internal_identifier"
         | 
| 1560 | 
            +
                t.string   "external_identifier"
         | 
| 1561 | 
            +
                t.string   "external_id_source"
         | 
| 1562 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1563 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1564 | 
            +
              end
         | 
| 1565 | 
            +
             | 
| 1566 | 
            +
              add_index "prod_type_role_types", ["parent_id"], :name => "index_prod_type_role_types_on_parent_id"
         | 
| 1567 | 
            +
             | 
| 1568 | 
            +
              create_table "product_instance_status_types", :force => true do |t|
         | 
| 1569 | 
            +
                t.integer  "parent_id"
         | 
| 1570 | 
            +
                t.integer  "lft"
         | 
| 1571 | 
            +
                t.integer  "rgt"
         | 
| 1572 | 
            +
                t.string   "description"
         | 
| 1573 | 
            +
                t.string   "internal_identifier"
         | 
| 1574 | 
            +
                t.string   "external_identifier"
         | 
| 1575 | 
            +
                t.string   "external_id_source"
         | 
| 1576 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1577 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1578 | 
            +
              end
         | 
| 1579 | 
            +
             | 
| 1580 | 
            +
              create_table "product_instances", :force => true do |t|
         | 
| 1581 | 
            +
                t.integer  "parent_id"
         | 
| 1582 | 
            +
                t.integer  "lft"
         | 
| 1583 | 
            +
                t.integer  "rgt"
         | 
| 1584 | 
            +
                t.string   "description"
         | 
| 1585 | 
            +
                t.integer  "product_instance_record_id"
         | 
| 1586 | 
            +
                t.string   "product_instance_record_type"
         | 
| 1587 | 
            +
                t.string   "external_identifier"
         | 
| 1588 | 
            +
                t.string   "external_id_source"
         | 
| 1589 | 
            +
                t.integer  "product_type_id"
         | 
| 1590 | 
            +
                t.string   "type"
         | 
| 1591 | 
            +
                t.integer  "prod_availability_status_type_id"
         | 
| 1592 | 
            +
                t.datetime "created_at",                       :null => false
         | 
| 1593 | 
            +
                t.datetime "updated_at",                       :null => false
         | 
| 1594 | 
            +
              end
         | 
| 1595 | 
            +
             | 
| 1596 | 
            +
              add_index "product_instances", ["parent_id"], :name => "index_product_instances_on_parent_id"
         | 
| 1597 | 
            +
              add_index "product_instances", ["product_instance_record_id", "product_instance_record_type"], :name => "bpi_2"
         | 
| 1598 | 
            +
              add_index "product_instances", ["product_type_id"], :name => "index_product_instances_on_product_type_id"
         | 
| 1599 | 
            +
             | 
| 1600 | 
            +
              create_table "product_offers", :force => true do |t|
         | 
| 1601 | 
            +
                t.string   "description"
         | 
| 1602 | 
            +
                t.integer  "product_offer_record_id"
         | 
| 1603 | 
            +
                t.string   "product_offer_record_type"
         | 
| 1604 | 
            +
                t.string   "external_identifier"
         | 
| 1605 | 
            +
                t.string   "external_id_source"
         | 
| 1606 | 
            +
                t.datetime "created_at",                :null => false
         | 
| 1607 | 
            +
                t.datetime "updated_at",                :null => false
         | 
| 1608 | 
            +
              end
         | 
| 1609 | 
            +
             | 
| 1610 | 
            +
              add_index "product_offers", ["product_offer_record_id", "product_offer_record_type"], :name => "bpi_3"
         | 
| 1611 | 
            +
             | 
| 1612 | 
            +
              create_table "product_types", :force => true do |t|
         | 
| 1613 | 
            +
                t.integer  "parent_id"
         | 
| 1614 | 
            +
                t.integer  "lft"
         | 
| 1615 | 
            +
                t.integer  "rgt"
         | 
| 1616 | 
            +
                t.string   "description"
         | 
| 1617 | 
            +
                t.integer  "product_type_record_id"
         | 
| 1618 | 
            +
                t.string   "product_type_record_type"
         | 
| 1619 | 
            +
                t.string   "external_identifier"
         | 
| 1620 | 
            +
                t.string   "internal_identifier"
         | 
| 1621 | 
            +
                t.string   "external_id_source"
         | 
| 1622 | 
            +
                t.string   "default_image_url"
         | 
| 1623 | 
            +
                t.integer  "list_view_image_id"
         | 
| 1624 | 
            +
                t.datetime "created_at",               :null => false
         | 
| 1625 | 
            +
                t.datetime "updated_at",               :null => false
         | 
| 1626 | 
            +
              end
         | 
| 1627 | 
            +
             | 
| 1628 | 
            +
              add_index "product_types", ["parent_id"], :name => "index_product_types_on_parent_id"
         | 
| 1629 | 
            +
              add_index "product_types", ["product_type_record_id", "product_type_record_type"], :name => "bpi_1"
         | 
| 1630 | 
            +
             | 
| 1631 | 
            +
              create_table "relationship_types", :force => true do |t|
         | 
| 1632 | 
            +
                t.integer  "parent_id"
         | 
| 1633 | 
            +
                t.integer  "lft"
         | 
| 1634 | 
            +
                t.integer  "rgt"
         | 
| 1635 | 
            +
                t.integer  "valid_from_role_type_id"
         | 
| 1636 | 
            +
                t.integer  "valid_to_role_type_id"
         | 
| 1637 | 
            +
                t.string   "name"
         | 
| 1638 | 
            +
                t.string   "description"
         | 
| 1639 | 
            +
                t.string   "internal_identifier"
         | 
| 1640 | 
            +
                t.string   "external_identifier"
         | 
| 1641 | 
            +
                t.string   "external_id_source"
         | 
| 1642 | 
            +
                t.datetime "created_at",              :null => false
         | 
| 1643 | 
            +
                t.datetime "updated_at",              :null => false
         | 
| 1644 | 
            +
              end
         | 
| 1645 | 
            +
             | 
| 1646 | 
            +
              add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
         | 
| 1647 | 
            +
              add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
         | 
| 1648 | 
            +
             | 
| 1649 | 
            +
              create_table "role_types", :force => true do |t|
         | 
| 1650 | 
            +
                t.integer  "parent_id"
         | 
| 1651 | 
            +
                t.integer  "lft"
         | 
| 1652 | 
            +
                t.integer  "rgt"
         | 
| 1653 | 
            +
                t.string   "description"
         | 
| 1654 | 
            +
                t.string   "comments"
         | 
| 1655 | 
            +
                t.string   "internal_identifier"
         | 
| 1656 | 
            +
                t.string   "external_identifier"
         | 
| 1657 | 
            +
                t.string   "external_id_source"
         | 
| 1658 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1659 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1660 | 
            +
              end
         | 
| 1661 | 
            +
             | 
| 1662 | 
            +
              create_table "scope_types", :force => true do |t|
         | 
| 1663 | 
            +
                t.string   "description"
         | 
| 1664 | 
            +
                t.string   "internal_identifier"
         | 
| 1665 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1666 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1667 | 
            +
              end
         | 
| 1668 | 
            +
             | 
| 1669 | 
            +
              add_index "scope_types", ["internal_identifier"], :name => "index_scope_types_on_internal_identifier"
         | 
| 1670 | 
            +
             | 
| 1671 | 
            +
              create_table "security_roles", :force => true do |t|
         | 
| 1672 | 
            +
                t.string   "description"
         | 
| 1673 | 
            +
                t.string   "internal_identifier"
         | 
| 1674 | 
            +
                t.string   "external_identifier"
         | 
| 1675 | 
            +
                t.string   "external_id_source"
         | 
| 1676 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1677 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1678 | 
            +
              end
         | 
| 1679 | 
            +
             | 
| 1680 | 
            +
              create_table "sessions", :force => true do |t|
         | 
| 1681 | 
            +
                t.string   "session_id", :null => false
         | 
| 1682 | 
            +
                t.text     "data"
         | 
| 1683 | 
            +
                t.datetime "created_at", :null => false
         | 
| 1684 | 
            +
                t.datetime "updated_at", :null => false
         | 
| 1685 | 
            +
              end
         | 
| 1686 | 
            +
             | 
| 1687 | 
            +
              add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
         | 
| 1688 | 
            +
              add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
         | 
| 1689 | 
            +
             | 
| 1690 | 
            +
              create_table "simple_product_offers", :force => true do |t|
         | 
| 1691 | 
            +
                t.string   "description"
         | 
| 1692 | 
            +
                t.integer  "product_id"
         | 
| 1693 | 
            +
                t.decimal  "base_price",  :precision => 8, :scale => 2
         | 
| 1694 | 
            +
                t.integer  "uom"
         | 
| 1695 | 
            +
                t.datetime "created_at",                                :null => false
         | 
| 1696 | 
            +
                t.datetime "updated_at",                                :null => false
         | 
| 1697 | 
            +
              end
         | 
| 1698 | 
            +
             | 
| 1699 | 
            +
              add_index "simple_product_offers", ["product_id"], :name => "index_simple_product_offers_on_product_id"
         | 
| 1700 | 
            +
             | 
| 1701 | 
            +
              create_table "tree_menu_node_defs", :force => true do |t|
         | 
| 1702 | 
            +
                t.string   "node_type"
         | 
| 1703 | 
            +
                t.integer  "parent_id"
         | 
| 1704 | 
            +
                t.integer  "lft"
         | 
| 1705 | 
            +
                t.integer  "rgt"
         | 
| 1706 | 
            +
                t.string   "menu_short_name"
         | 
| 1707 | 
            +
                t.string   "menu_description"
         | 
| 1708 | 
            +
                t.string   "text"
         | 
| 1709 | 
            +
                t.string   "icon_url"
         | 
| 1710 | 
            +
                t.string   "target_url"
         | 
| 1711 | 
            +
                t.string   "resource_class"
         | 
| 1712 | 
            +
                t.datetime "created_at",       :null => false
         | 
| 1713 | 
            +
                t.datetime "updated_at",       :null => false
         | 
| 1714 | 
            +
              end
         | 
| 1715 | 
            +
             | 
| 1716 | 
            +
              add_index "tree_menu_node_defs", ["parent_id"], :name => "index_tree_menu_node_defs_on_parent_id"
         | 
| 1717 | 
            +
             | 
| 1718 | 
            +
              create_table "user_preferences", :force => true do |t|
         | 
| 1719 | 
            +
                t.integer  "user_id"
         | 
| 1720 | 
            +
                t.integer  "preference_id"
         | 
| 1721 | 
            +
                t.integer  "preferenced_record_id"
         | 
| 1722 | 
            +
                t.string   "preferenced_record_type"
         | 
| 1723 | 
            +
                t.datetime "created_at",              :null => false
         | 
| 1724 | 
            +
                t.datetime "updated_at",              :null => false
         | 
| 1725 | 
            +
              end
         | 
| 1726 | 
            +
             | 
| 1727 | 
            +
              add_index "user_preferences", ["preference_id"], :name => "index_user_preferences_on_preference_id"
         | 
| 1728 | 
            +
              add_index "user_preferences", ["preferenced_record_id"], :name => "index_user_preferences_on_preferenced_record_id"
         | 
| 1729 | 
            +
              add_index "user_preferences", ["preferenced_record_type"], :name => "index_user_preferences_on_preferenced_record_type"
         | 
| 1730 | 
            +
              add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
         | 
| 1731 | 
            +
             | 
| 1732 | 
            +
              create_table "users", :force => true do |t|
         | 
| 1733 | 
            +
                t.string   "username"
         | 
| 1734 | 
            +
                t.string   "email"
         | 
| 1735 | 
            +
                t.integer  "party_id"
         | 
| 1736 | 
            +
                t.string   "type"
         | 
| 1737 | 
            +
                t.string   "salt"
         | 
| 1738 | 
            +
                t.string   "crypted_password"
         | 
| 1739 | 
            +
                t.datetime "last_login_at"
         | 
| 1740 | 
            +
                t.datetime "last_logout_at"
         | 
| 1741 | 
            +
                t.datetime "last_activity_at"
         | 
| 1742 | 
            +
                t.integer  "failed_logins_count",             :default => 0
         | 
| 1743 | 
            +
                t.datetime "lock_expires_at"
         | 
| 1744 | 
            +
                t.string   "remember_me_token"
         | 
| 1745 | 
            +
                t.datetime "remember_me_token_expires_at"
         | 
| 1746 | 
            +
                t.string   "reset_password_token"
         | 
| 1747 | 
            +
                t.datetime "reset_password_token_expires_at"
         | 
| 1748 | 
            +
                t.datetime "reset_password_email_sent_at"
         | 
| 1749 | 
            +
                t.string   "activation_state"
         | 
| 1750 | 
            +
                t.string   "activation_token"
         | 
| 1751 | 
            +
                t.datetime "activation_token_expires_at"
         | 
| 1752 | 
            +
                t.string   "security_question_1"
         | 
| 1753 | 
            +
                t.string   "security_answer_1"
         | 
| 1754 | 
            +
                t.string   "security_question_2"
         | 
| 1755 | 
            +
                t.string   "security_answer_2"
         | 
| 1756 | 
            +
                t.datetime "created_at",                                     :null => false
         | 
| 1757 | 
            +
                t.datetime "updated_at",                                     :null => false
         | 
| 1758 | 
            +
              end
         | 
| 1759 | 
            +
             | 
| 1760 | 
            +
              add_index "users", ["activation_token"], :name => "index_users_on_activation_token"
         | 
| 1761 | 
            +
              add_index "users", ["email"], :name => "index_users_on_email", :unique => true
         | 
| 1762 | 
            +
              add_index "users", ["last_logout_at", "last_activity_at"], :name => "activity_idx"
         | 
| 1763 | 
            +
              add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token"
         | 
| 1764 | 
            +
              add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token"
         | 
| 1765 | 
            +
              add_index "users", ["username"], :name => "index_users_on_username", :unique => true
         | 
| 1766 | 
            +
             | 
| 1767 | 
            +
              create_table "valid_configurations", :force => true do |t|
         | 
| 1768 | 
            +
                t.integer  "configured_item_id"
         | 
| 1769 | 
            +
                t.string   "configured_item_type"
         | 
| 1770 | 
            +
                t.integer  "configuration_id"
         | 
| 1771 | 
            +
                t.datetime "created_at",           :null => false
         | 
| 1772 | 
            +
                t.datetime "updated_at",           :null => false
         | 
| 1773 | 
            +
              end
         | 
| 1774 | 
            +
             | 
| 1775 | 
            +
              add_index "valid_configurations", ["configuration_id"], :name => "index_valid_configurations_on_configuration_id"
         | 
| 1776 | 
            +
              add_index "valid_configurations", ["configured_item_id", "configured_item_type"], :name => "configured_item_poly_idx"
         | 
| 1777 | 
            +
             | 
| 1778 | 
            +
              create_table "valid_note_types", :force => true do |t|
         | 
| 1779 | 
            +
                t.integer  "valid_note_type_record_id"
         | 
| 1780 | 
            +
                t.string   "valid_note_type_record_type"
         | 
| 1781 | 
            +
                t.integer  "note_type_id"
         | 
| 1782 | 
            +
                t.datetime "created_at",                  :null => false
         | 
| 1783 | 
            +
                t.datetime "updated_at",                  :null => false
         | 
| 1784 | 
            +
              end
         | 
| 1785 | 
            +
             | 
| 1786 | 
            +
              add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
         | 
| 1787 | 
            +
              add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
         | 
| 1788 | 
            +
             | 
| 1789 | 
            +
              create_table "valid_preference_types", :force => true do |t|
         | 
| 1790 | 
            +
                t.integer "preference_type_id"
         | 
| 1791 | 
            +
                t.integer "preferenced_record_id"
         | 
| 1792 | 
            +
                t.string  "preferenced_record_type"
         | 
| 1793 | 
            +
              end
         | 
| 1794 | 
            +
             | 
| 1795 | 
            +
              create_table "valid_price_plan_components", :force => true do |t|
         | 
| 1796 | 
            +
                t.integer  "pricing_plan_id"
         | 
| 1797 | 
            +
                t.integer  "pricing_plan_component_id"
         | 
| 1798 | 
            +
                t.datetime "created_at",                :null => false
         | 
| 1799 | 
            +
                t.datetime "updated_at",                :null => false
         | 
| 1800 | 
            +
              end
         | 
| 1801 | 
            +
             | 
| 1802 | 
            +
              add_index "valid_price_plan_components", ["pricing_plan_component_id"], :name => "index_valid_price_plan_components_on_pricing_plan_component_id"
         | 
| 1803 | 
            +
              add_index "valid_price_plan_components", ["pricing_plan_id"], :name => "index_valid_price_plan_components_on_pricing_plan_id"
         | 
| 1804 | 
            +
             | 
| 1805 | 
            +
              create_table "view_types", :force => true do |t|
         | 
| 1806 | 
            +
                t.string   "internal_identifier"
         | 
| 1807 | 
            +
                t.string   "description"
         | 
| 1808 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1809 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1810 | 
            +
              end
         | 
| 1811 | 
            +
             | 
| 1812 | 
            +
              create_table "widgets", :force => true do |t|
         | 
| 1813 | 
            +
                t.string   "description"
         | 
| 1814 | 
            +
                t.string   "internal_identifier"
         | 
| 1815 | 
            +
                t.string   "icon"
         | 
| 1816 | 
            +
                t.string   "xtype"
         | 
| 1817 | 
            +
                t.datetime "created_at",          :null => false
         | 
| 1818 | 
            +
                t.datetime "updated_at",          :null => false
         | 
| 1819 | 
            +
              end
         | 
| 1820 | 
            +
             | 
| 1821 | 
            +
            end
         |