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