<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateTrackingCode extends Migration { public function up() { Schema::create('tracking_code', function (Blueprint $TNrxH) { $TNrxH->increments('id'); $TNrxH->timestamps(); $TNrxH->string('code', 50)->nullable()->comment(''); $TNrxH->string('batch', 20)->nullable()->comment(''); $TNrxH->string('transportCode', 40)->nullable()->comment(''); $TNrxH->integer('hits')->nullable()->comment(''); $TNrxH->dateTime('firstQueryTime')->nullable()->comment(''); $TNrxH->integer('productId')->nullable()->comment(''); $TNrxH->integer('agentId')->nullable()->comment(''); $TNrxH->tinyInteger('enable')->nullable()->comment(''); $TNrxH->unique(array('code')); $TNrxH->index(array('batch')); $TNrxH->index(array('agentId')); $TNrxH->index(array('productId')); }); } public function down() { } }