<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateMemberGroup extends Migration { public function up() { goto sM4H3; njIl7: Schema::table('member_user', function (Blueprint $tM63P) { $tM63P->integer('groupId')->nullable()->comment(''); }); goto H4m2P; H4m2P: \ModStart\Core\Dao\ModelUtil::insertAll('member_group', array(array('title' => '普通用户', 'description' => '', 'isDefault' => true), array('title' => '高级用户', 'description' => '', 'isDefault' => false))); goto RNiBT; sM4H3: Schema::create('member_group', function (Blueprint $tM63P) { $tM63P->increments('id'); $tM63P->timestamps(); $tM63P->string('title', 50)->nullable()->comment('名称'); $tM63P->string('description', 200)->nullable()->comment('描述'); $tM63P->tinyInteger('isDefault')->nullable()->comment('默认'); }); goto njIl7; RNiBT: } public function down() { } }