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