Sha256: caa492013bd0bd6864f9c12a55012e55f32c1a11b9acd239628c0461be095fe0

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

class CreateDynamicAttributeValues < ActiveRecord::Migration
  def self.up
    create_table :dynamic_attribute_values do |t|
      t.belongs_to :attribute,
        :product
      t.timestamps
    end
    add_index :dynamic_attribute_values, [:attribute_id, :product_id], :unique => true
    DynamicAttributeValue.create_translation_table!(:value=>:string)
  end

  def self.down
    DynamicAttributeValue.drop_translation_table!
    remove_index :dynamic_attribute_values, :columns => [:attribute_id, :product_id]
    drop_table :dynamic_attribute_values
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forgeos_commerce-1.9.1.rc1 db/migrate/20091009134631_create_dynamic_attribute_values.rb
forgeos_commerce-1.9.0 db/migrate/20091009134631_create_dynamic_attribute_values.rb