id('management_id'); // 主キー、AUTO_INCREMENT, NOT NULL $table->string('management_name', 255); // varchar(255), NOT NULL $table->string('management_code', 10)->unique(); // varchar(10), NOT NULL, UNIQUE $table->boolean('municipality_flag')->nullable(); // tinyint(1), NULL $table->boolean('government_approval_required')->nullable(); // tinyint(1), NULL $table->boolean('valid_flag'); // tinyint(1) $table->timestamps(); // created_at, updated_at (datetime), NOT NULL $table->unsignedInteger('operator_id')->nullable(); // int(10), NULL $table->foreign('operator_id')->references('ope_id')->on('ope'); // 外部キー(opeテーブルのope_idを参照) }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('management'); } };