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