feat: [pmis] 자재관리 테이블 마이그레이션 추가
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('pmis_materials', function (Blueprint $table) {
|
||||
$table->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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user