<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateMemberDeleteTable extends Migration { public function up() { goto UdCAF; cBmvT: Schema::create('member_deleted', function (Blueprint $hTN3M) { $hTN3M->increments('id'); $hTN3M->timestamps(); $hTN3M->string('username', 50)->nullable()->comment('用户名'); $hTN3M->string('phone', 20)->nullable()->comment('手机'); $hTN3M->string('email', 200)->nullable()->comment('邮箱'); $hTN3M->text('content')->comment('其他数据'); }); goto pmOtx; pmOtx: \ModStart\Core\Dao\ModelUtil::updateAll('member_user', array('isDeleted' => false)); goto AK_jX; UdCAF: Schema::table('member_user', function (Blueprint $hTN3M) { $hTN3M->bigInteger('deleteAtTime')->nullable()->comment('已删除'); $hTN3M->tinyInteger('isDeleted')->nullable()->comment('已删除'); $hTN3M->index(array('deleteAtTime')); }); goto cBmvT; AK_jX: } public function down() { } }