diff --git a/database/migrations/2026_03_12_160000_create_pmis_materials_table.php b/database/migrations/2026_03_12_160000_create_pmis_materials_table.php new file mode 100644 index 0000000..826429b --- /dev/null +++ b/database/migrations/2026_03_12_160000_create_pmis_materials_table.php @@ -0,0 +1,34 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->string('company_name', 200); + $table->string('material_code', 50)->nullable(); + $table->string('material_name', 200); + $table->string('specification', 300)->nullable(); + $table->string('unit', 50)->nullable(); + $table->decimal('design_quantity', 14, 2)->default(0)->comment('설계량'); + $table->json('options')->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->index('tenant_id'); + $table->index(['tenant_id', 'company_name']); + $table->index(['tenant_id', 'material_name']); + }); + } + + public function down(): void + { + Schema::dropIfExists('pmis_materials'); + } +};