Sha256: 505ffaa40e7e88bda6e99818803c3de36e6927cf9c713952ea2e1646d3841975

Contents?: true

Size: 720 Bytes

Versions: 16

Compression:

Stored size: 720 Bytes

Contents

class CreateIndexes < ActiveRecord::Migration
  def self.up
    remove_index :products, [:permalink, :available_on]
 
    add_index(:products, :name)
    add_index(:products, :deleted_at)
    add_index(:variants, :product_id)
    add_index(:option_values_variants, :variant_id)
    add_index(:products_taxons, :product_id)
    add_index(:products_taxons, :taxon_id)
  end

  def self.down
    add_index :products, [:permalink, :available_on]
 
    remove_index(:products, :name)
    remove_index(:products, :deleted_at)
    remove_index(:variants, :product_id)
    remove_index(:option_values_variants, :variant_id)
    remove_index(:products_taxons, :product_id)
    remove_index(:products_taxons, :taxon_id)
  end
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
kdmny-spree-0.0.1 db/migrate/20081219091142_create_indexes.rb
spree-enriquez-0.9.4 db/migrate/20081219091142_create_indexes.rb
spree-0.9.4 db/migrate/20081219091142_create_indexes.rb
spree-0.9.3 db/migrate/20081219091142_create_indexes.rb
spree-0.9.2 db/migrate/20081219091142_create_indexes.rb
spree-0.9.1 db/migrate/20081219091142_create_indexes.rb
spree-0.9.0 db/migrate/20081219091142_create_indexes.rb
spree-0.8.4 db/migrate/20081219091142_create_indexes.rb
spree-0.8.5 db/migrate/20081219091142_create_indexes.rb
spree-0.6.0 db/migrate/20081219091142_create_indexes.rb
spree-0.7.0 db/migrate/20081219091142_create_indexes.rb
spree-0.7.1 db/migrate/20081219091142_create_indexes.rb
spree-0.8.0 db/migrate/20081219091142_create_indexes.rb
spree-0.8.1 db/migrate/20081219091142_create_indexes.rb
spree-0.8.2 db/migrate/20081219091142_create_indexes.rb
spree-0.8.3 db/migrate/20081219091142_create_indexes.rb