fix:sales_contract_products.tenant_id nullable 허용

가망고객 단계에서는 아직 테넌트가 생성되지 않으므로
tenant_id가 null일 수 있음

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-02 09:53:35 +09:00
parent 32392ef4de
commit 9cc73f4688

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
* 가망고객 단계에서는 tenant_id가 없으므로 nullable 허용
*/
public function up(): void
{
Schema::table('sales_contract_products', function (Blueprint $table) {
$table->unsignedBigInteger('tenant_id')->nullable()->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('sales_contract_products', function (Blueprint $table) {
$table->unsignedBigInteger('tenant_id')->nullable(false)->change();
});
}
};