Sha256: 5b0918c9f2f8d66c0f5e618072b25ba345ea2245d67d6d15c11ac871a367b51f

Contents?: true

Size: 656 Bytes

Versions: 3

Compression:

Stored size: 656 Bytes

Contents

class AddProductAttributesStructure < CamaManager.migration_class
  def change
    create_table :plugins_ecommerce_attributes do |t|
      t.string :key, :label
      t.integer :parent_id, index: true
      t.integer :site_id, index: true
      t.integer :position, default: 0
    end

    create_table :plugins_ecommerce_product_variations do |t|
      t.decimal :amount, :precision => 8, :scale => 2
      t.belongs_to :product, index: true
      t.string :photo, :sku
      t.integer :weight
      t.integer :position, :qty, default: 0
      t.string :attribute_ids
    end

    add_column :plugins_ecommerce_products, :variation_id, :integer
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
camaleon_ecommerce-2.0.4 db/migrate/20160620200501_add_product_attributes_structure.rb
camaleon_ecommerce-2.0.3 db/migrate/20160620200501_add_product_attributes_structure.rb
camaleon_ecommerce-2.0.2 db/migrate/20160620200501_add_product_attributes_structure.rb