schema()); MigrationHelper::createTable('user_histories', $this->schema()); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('users'); Schema::dropIfExists('user_histories'); } private function schema() { return function (Blueprint $table, MigrationHelper $helper) { $helper->baseColumn() ->contractId(); $table->string('email')->comment("Email")->nullable(); $table->string('password')->comment("ログインパスワード")->nullable(); $table->unsignedTinyInteger("role")->comment("認可")->nullable(); $table->string('name')->comment("氏名")->nullable(); $helper->index(1, [ColumnName::CONTRACT_ID]); $helper->index(2, ['email']); }; } };