fix:sales_contract_products.tenant_id nullable 변경

- 가망고객(prospect) 모드에서 계약상품 저장 지원
- tenant_id가 없어도 management_id로 연결 가능

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-01-31 20:44:18 +09:00
parent fd3dbb75af
commit 32392ef4de

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.
*/
public function up(): void
{
Schema::table('sales_contract_products', function (Blueprint $table) {
// tenant_id를 nullable로 변경 (가망고객 모드 지원)
$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();
});
}
};