diff --git a/database/migrations/2026_03_12_150000_create_pmis_equipments_table.php b/database/migrations/2026_03_12_150000_create_pmis_equipments_table.php new file mode 100644 index 0000000..3042742 --- /dev/null +++ b/database/migrations/2026_03_12_150000_create_pmis_equipments_table.php @@ -0,0 +1,39 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->string('company_name', 200); + $table->string('equipment_code', 50)->nullable(); + $table->string('equipment_name', 200); + $table->string('specification', 300)->nullable(); + $table->string('unit', 50)->nullable(); + $table->string('equipment_number', 100); + $table->string('operator', 50)->nullable()->comment('운전원'); + $table->date('inspection_end_date')->nullable()->comment('검사종료일'); + $table->boolean('inspection_not_applicable')->default(false)->comment('검사 해당없음'); + $table->date('insurance_end_date')->nullable()->comment('보험종료일'); + $table->boolean('insurance_not_applicable')->default(false)->comment('보험 해당없음'); + $table->json('options')->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->index('tenant_id'); + $table->index(['tenant_id', 'company_name']); + $table->index(['tenant_id', 'equipment_name']); + }); + } + + public function down(): void + { + Schema::dropIfExists('pmis_equipments'); + } +};