Sha256: 475fc0bc38860b6d30482020d3da1e252190b8d986743810be21bded5227a87d

Contents?: true

Size: 621 Bytes

Versions: 35

Compression:

Stored size: 621 Bytes

Contents

class AddIconToTaxons < ActiveRecord::Migration
  def up
    # skip this migration if the attribute already exists because of advanced taxon extension
    return if column_exists?(:taxons, :icon_file_name)
    add_column :taxons, :icon_file_name,    :string
    add_column :taxons, :icon_content_type, :string
    add_column :taxons, :icon_file_size,    :integer
    add_column :taxons, :icon_updated_at,   :datetime
  end

  def down
    remove_column :taxons, :icon_file_name
    remove_column :taxons, :icon_content_type
    remove_column :taxons, :icon_file_size
    remove_column :taxons, :icon_updated_at
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
spree_core-1.1.0 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_core-1.0.4 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_core-1.1.0.rc2 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_core-1.1.0.rc1 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_pag_seguro-1.0.3 spec/dummy/db/migrate/20120301154092_add_icon_to_taxons.rb
spree_pag_seguro-1.0.2 spec/dummy/db/migrate/20120301154092_add_icon_to_taxons.rb
spree_core-1.0.3 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_core-1.0.2 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_core-1.0.1 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_flat_in_range-0.1.0 spec/dummy/db/migrate/20120218160399_add_icon_to_taxons.rb
spree_core-1.0.0 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_core-1.0.0.rc4 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_core-1.0.0.rc3 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_core-1.0.0.rc2 db/migrate/20100506180619_add_icon_to_taxons.rb
spree_core-1.0.0.rc1 db/migrate/20100506180619_add_icon_to_taxons.rb