<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreatePhoto extends Migration { public function up() { Schema::create('photo', function (Blueprint $K4MEV) { $K4MEV->increments('id'); $K4MEV->timestamps(); $K4MEV->integer('categoryId')->comment('分类ID')->nullable(); $K4MEV->integer('sort')->comment('排序，越小越靠前')->nullable(); $K4MEV->string('title', 200)->nullable()->comment(''); $K4MEV->string('thumb', 200)->nullable()->comment(''); $K4MEV->string('url', 200)->nullable()->comment(''); $K4MEV->integer('width')->nullable()->comment(''); $K4MEV->integer('height')->nullable()->comment(''); $K4MEV->integer('size')->nullable()->comment(''); $K4MEV->index(array('categoryId')); }); } public function down() { } }