Sha256: 6a600dccb5495fe8048bb2875791a5a6ef9ca8239148caf85ff166b5112e645d

Contents?: true

Size: 1.78 KB

Versions: 14

Compression:

Stored size: 1.78 KB

Contents

# This migration comes from erp_agreements (originally 20080805000071)
class AgreementsServicesIndexes < ActiveRecord::Migration
  def self.up
    add_index :agreements, :agreement_type_id
    add_index :agreements, :product_id
    
    add_index :agreement_types, :parent_id
    
    add_index :agreement_items, :agreement_id
    add_index :agreement_items, :agreement_item_type_id
    
    add_index :agreement_item_types, :parent_id
    
    add_index :agreement_party_roles, :agreement_id
    add_index :agreement_party_roles, :party_id
    add_index :agreement_party_roles, :role_type_id
    
    add_index :agreement_relationships, :agreement_reln_type_id
    add_index :agreement_relationships, :status_type_id
    
    add_index :agreement_reln_types, :parent_id
    add_index :agreement_reln_types, :valid_from_role_type_id
    add_index :agreement_reln_types, :valid_to_role_type_id

    add_index :agreement_role_types, :parent_id
  end

  def self.down
    remove_index :agreements, :agreement_type_id
    remove_index :agreements, :product_id
    
    remove_index :agreement_types, :parent_id
    
    remove_index :agreement_items, :agreement_id
    remove_index :agreement_items, :agreement_item_type_id
    
    remove_index :agreement_item_types, :parent_id
    
    remove_index :agreement_party_roles, :agreement_id
    remove_index :agreement_party_roles, :party_id
    remove_index :agreement_party_roles, :role_type_id
    
    remove_index :agreement_relationships, :agreement_reln_type_id
    remove_index :agreement_relationships, :status_type_id
    
    remove_index :agreement_reln_types, :parent_id
    remove_index :agreement_reln_types, :valid_from_role_type_id
    remove_index :agreement_reln_types, :valid_to_role_type_id

    remove_index :agreement_role_types, :parent_id
  end
end

Version data entries

14 entries across 14 versions & 9 rubygems

Version Path
erp_orders-3.1.1 spec/dummy/db/migrate/20130107205942_agreements_services_indexes.erp_agreements.rb
erp_txns_and_accts-3.1.1 spec/dummy/db/migrate/20130107205650_agreements_services_indexes.erp_agreements.rb
erp_commerce-3.1.3 spec/dummy/db/migrate/20130107205828_agreements_services_indexes.erp_agreements.rb
erp_products-3.1.1 spec/dummy/db/migrate/20130107214722_agreements_services_indexes.erp_agreements.rb
erp_commerce-3.1.1 spec/dummy/db/migrate/20130107214961_agreements_services_indexes.erp_agreements.rb
erp_rules-3.1.0 spec/dummy/db/migrate/20121214005241_agreements_services_indexes.erp_agreements.rb
erp_invoicing-3.1.0 spec/dummy/db/migrate/20121214000243_agreements_services_indexes.erp_agreements.rb
erp_financial_accounting-3.1.0 spec/dummy/db/migrate/20121213234221_agreements_services_indexes.erp_agreements.rb
erp_inventory-3.1.0 spec/dummy/db/migrate/20121213235626_agreements_services_indexes.erp_agreements.rb
erp_commerce-3.1.0 spec/dummy/db/migrate/20130107214961_agreements_services_indexes.erp_agreements.rb
erp_txns_and_accts-3.1.0 spec/dummy/db/migrate/20130107214866_agreements_services_indexes.erp_agreements.rb
erp_orders-3.1.0 spec/dummy/db/migrate/20130107214814_agreements_services_indexes.erp_agreements.rb
erp_products-3.1.0 spec/dummy/db/migrate/20130107214722_agreements_services_indexes.erp_agreements.rb
erp_agreements-3.1.0 spec/dummy/db/migrate/20130107214620_agreements_services_indexes.erp_agreements.rb