unsignedInteger('id', true)->primary(); $table->text('type')->nullable(); $table->boolean('is_gm')->default(false); $table->dateTime('login_time')->nullable(); $table->integer('channel')->nullable(); $table->unsignedInteger('account_id')->nullable(); $table->unsignedInteger('pid')->nullable(); $table->text('client_version')->nullable(); $table->text('ip')->nullable(); $table->dateTime('logout_time')->nullable(); $table->integer('playtime')->default(0); $table->foreign('account_id')->references('id')->on('account'); $table->foreign('pid')->references('id')->on('player')->cascadeOnDelete(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('loginlog2'); } };