Sha256: 809256a4bb5b308b8cbf46d5ddb93b33dacdb7ff53fe4d844206851ffab668b5

Contents?: true

Size: 322 Bytes

Versions: 11

Compression:

Stored size: 322 Bytes

Contents

class AddDepthToSpreeTaxons < ActiveRecord::Migration[4.2]
  def up
    add_column :spree_taxons, :depth, :integer

    say_with_time 'Update depth on all taxons' do
      Spree::Taxon.reset_column_information
      Spree::Taxon.all.each(&:save)
    end
  end

  def down
    remove_column :spree_taxons, :depth
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
solidus_core-2.3.1 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.2.2 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.3.0 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.3.0.rc3 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.3.0.rc2 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.3.0.rc1 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.3.0.beta1 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.2.1 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.2.0 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.2.0.rc1 db/migrate/20130826062534_add_depth_to_spree_taxons.rb
solidus_core-2.2.0.beta1 db/migrate/20130826062534_add_depth_to_spree_taxons.rb