Sha256: 27aa124160c825f5032532087ebafa0feb66a139170355abd245634876a27b9f

Contents?: true

Size: 339 Bytes

Versions: 2

Compression:

Stored size: 339 Bytes

Contents

class CreateVariants < ActiveRecord::Migration
  def change
    create_table :kms_variants do |t|
      t.string :name
      t.decimal :price, precision: 8, scale: 2
      t.references :product, index: true

      t.timestamps null: false
    end
    add_foreign_key :kms_variants, :kms_products if respond_to?(:add_foreign_key)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kms_catalog-0.5.0 db/migrate/20150216070337_create_variants.rb
kms_catalog-0.4.0 db/migrate/20150216070337_create_variants.rb