<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateMemberMessage extends Migration { public function up() { if (!\ModStart\Core\Dao\ModelManageUtil::hasTable('member_message')) { Schema::create('member_message', function (Blueprint $hTN3M) { $hTN3M->increments('id'); $hTN3M->timestamps(); $hTN3M->integer('userId')->comment('用户ID')->nullable(); $hTN3M->tinyInteger('status')->comment('1未读 2已读')->nullable(); $hTN3M->integer('fromId')->comment('来源用户ID')->nullable(); $hTN3M->text('content')->comment('消息内容(html)')->nullable(); $hTN3M->index(array('userId', 'status')); }); } } public function down() { } }