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