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