Sha256: 4a9cdc8ea791ffe84d6d866252949b0f492458d1cd9077f6c67aac6f677bb173

Contents?: true

Size: 469 Bytes

Versions: 2

Compression:

Stored size: 469 Bytes

Contents

class CreateAttributesProductTypes < ActiveRecord::Migration
  def self.up
    create_table :attributes_product_types, :id => false do |t|
      t.belongs_to :attribute,
        :product_type
    end
    add_index :attributes_product_types, [:attribute_id, :product_type_id], :unique => true, :name => 'a_p_t_association'
  end

  def self.down
    remove_index :attributes_product_types, :name => 'a_p_t_association'
    drop_table :attributes_product_types
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forgeos_commerce-1.9.1.rc1 db/migrate/20091009134455_create_attributes_product_types.rb
forgeos_commerce-1.9.0 db/migrate/20091009134455_create_attributes_product_types.rb