Sha256: 42e5656cec7ba617af4e0587c89441945442af2af69498944e93d4fab55970f8

Contents?: true

Size: 657 Bytes

Versions: 61

Compression:

Stored size: 657 Bytes

Contents

class AddIconToTaxons < ActiveRecord::Migration
    def self.up
      # skip this migration if the attribute already exists because of advanced taxon extension
      return if Taxon.new.respond_to? :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 self.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

61 entries across 49 versions & 10 rubygems

Version Path
spree-0.11.0 db/migrate/20100506180619_add_icon_to_taxons.rb