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