20160728010924_create_products_variants.rb 410 B

12345678910111213
  1. class CreateProductsVariants < ActiveRecord::Migration
  2. def change
  3. create_table :products_variants do |t|
  4. t.belongs_to :product, index: true
  5. t.text :attributes_json, null: false
  6. t.string :sku, limit: 30, null: false, default: ''
  7. t.string :barcode, null: true
  8. t.decimal :price_sale, precision: 10, scale:2
  9. t.integer :status
  10. t.timestamps null: false
  11. end
  12. end
  13. end