<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateAdmin extends Migration { public function up() { goto dB1_W; NUbmg: Schema::create('admin_log', function (Blueprint $tkusQ) { $tkusQ->increments('id'); $tkusQ->timestamps(); $tkusQ->integer('adminUserId')->nullable()->comment('用户ID'); $tkusQ->tinyInteger('type')->nullable()->comment('类型'); $tkusQ->string('summary', 400)->nullable()->comment('摘要'); }); goto sA6CU; sA6CU: Schema::create('admin_log_data', function (Blueprint $tkusQ) { $tkusQ->increments('id'); $tkusQ->timestamps(); $tkusQ->text('content')->nullable()->comment('内容'); }); goto VT3rA; M98O0: Schema::connection($oBEQO)->create('admin_user', function (Blueprint $tkusQ) { $tkusQ->increments('id'); $tkusQ->timestamps(); $tkusQ->string('username', 100)->comment('')->nullable(); $tkusQ->char('password', 32)->comment('')->nullable(); $tkusQ->char('passwordSalt', 16)->comment('')->nullable(); $tkusQ->boolean('ruleChanged')->comment('')->nullable(); $tkusQ->timestamp('lastLoginTime')->comment('')->nullable(); $tkusQ->string('lastLoginIp', 20)->comment('')->nullable(); $tkusQ->timestamp('lastChangePwdTime')->comment('')->nullable(); $tkusQ->unique('username'); }); goto hTqKk; hTqKk: Schema::connection($oBEQO)->create('admin_user_role', function (Blueprint $tkusQ) { $tkusQ->increments('id'); $tkusQ->timestamps(); $tkusQ->unsignedInteger('userId')->nullable(); $tkusQ->unsignedInteger('roleId')->nullable(); $tkusQ->index('userId'); $tkusQ->index('roleId'); }); goto NUbmg; FpSfq: Schema::connection($oBEQO)->create('admin_role_rule', function (Blueprint $tkusQ) { $tkusQ->increments('id'); $tkusQ->timestamps(); $tkusQ->unsignedInteger('roleId')->comment('')->nullable(); $tkusQ->string('rule', 200)->comment('')->nullable(); $tkusQ->index('roleId'); }); goto M98O0; dB1_W: $oBEQO = config('modstart.admin.database.connection') ?: config('database.default'); goto o8pLK; o8pLK: Schema::connection($oBEQO)->create('admin_role', function (Blueprint $tkusQ) { $tkusQ->increments('id'); $tkusQ->timestamps(); $tkusQ->string('name', 200)->comment('')->nullable(); }); goto FpSfq; VT3rA: } public function down() { } }