Sha256: 665468cfd93980050028375c4359422267671d4106a770a550bfdfa2fe148366

Contents?: true

Size: 461 Bytes

Versions: 9

Compression:

Stored size: 461 Bytes

Contents

# This migration comes from spree (originally 20130826062534)
class AddDepthToSpreeTaxons < ActiveRecord::Migration[4.2]
  def up
    if !Spree::Taxon.column_names.include?('depth')
      add_column :spree_taxons, :depth, :integer

      say_with_time 'Update depth on all taxons' do
        Spree::Taxon.reset_column_information
        Spree::Taxon.all.each { |t| t.save }
      end
    end
  end

  def down
    remove_column :spree_taxons, :depth
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195802_add_depth_to_spree_taxons.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091743_add_depth_to_spree_taxons.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091743_add_depth_to_spree_taxons.spree.rb
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516181931_add_depth_to_spree_taxons.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516181931_add_depth_to_spree_taxons.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516181931_add_depth_to_spree_taxons.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516181931_add_depth_to_spree_taxons.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516181931_add_depth_to_spree_taxons.spree.rb
spree_purchase_order-3.2.0 spec/dummy/db/migrate/20180516181931_add_depth_to_spree_taxons.spree.rb