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