<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateProduct extends Migration { public function up() { Schema::create('product', function (Blueprint $fnOXp) { $fnOXp->increments('id'); $fnOXp->timestamps(); $fnOXp->integer('categoryId')->nullable()->comment('分类ID'); $fnOXp->string('title', 100)->nullable()->comment('标题'); $fnOXp->string('keywords', 100)->nullable()->comment('关键词'); $fnOXp->string('description', 100)->nullable()->comment('描述'); $fnOXp->string('cover', 100)->nullable()->comment('封面'); $fnOXp->decimal('price', 20, 2)->nullable()->comment('价格'); $fnOXp->text('content')->nullable()->comment('描述'); }); } public function down() { } }