<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateGoodsSpec extends Migration { public function up() { Schema::create('goods_spec', function (Blueprint $onV5E) { $onV5E->increments('id'); $onV5E->timestamps(); $onV5E->integer('goodsId')->nullable()->comment('商品ID'); $onV5E->string('spec', 160)->nullable()->comment('规格组合'); $onV5E->decimal('price', 20, 2)->nullable()->comment('价格'); $onV5E->decimal('marketPrice', 20, 2)->nullable()->comment('划线价'); $onV5E->integer('stock')->nullable()->comment('存货'); $onV5E->string('cover', 200)->nullable()->comment('封面'); $onV5E->index('goodsId'); $onV5E->index('spec'); }); } public function down() { } }