Sha256: 1ec675f5d80fac37299580361928d0d33cacdee5533f479b7b1f7cf129000ee7

Contents?: true

Size: 652 Bytes

Versions: 4

Compression:

Stored size: 652 Bytes

Contents

class AddProductAttributesStructure < ActiveRecord::Migration
  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

4 entries across 4 versions & 1 rubygems

Version Path
camaleon_ecommerce-2.0.1 db/migrate/20160620200501_add_product_attributes_structure.rb
camaleon_ecommerce-2.0.0 db/migrate/20160620200501_add_product_attributes_structure.rb
camaleon_ecommerce-1.2.1 db/migrate/20160620200501_add_product_attributes_structure.rb
camaleon_ecommerce-1.2 db/migrate/20160620200501_add_product_attributes_structure.rb