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