<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateMemberFavorite extends Migration { public function up() { Schema::create('member_favorite', function (Blueprint $hTN3M) { $hTN3M->increments('id'); $hTN3M->timestamps(); $hTN3M->integer('userId')->comment('用户ID')->nullable(); $hTN3M->string('category', 20)->comment('类别')->nullable(); $hTN3M->integer('categoryId')->comment('所属类别ID')->nullable(); $hTN3M->index(array('userId', 'category')); }); } public function down() { } }