feat:문서양식 결재라인 user_id 및 연결 필드 마이그레이션 추가
- document_template_approval_lines에 user_id 컬럼 추가 - document_templates에 linked_item_ids(JSON), linked_process_id 컬럼 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?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
|
||||
{
|
||||
// 결재라인에 user_id 추가
|
||||
Schema::table('document_template_approval_lines', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('user_id')->nullable()->after('role')
|
||||
->comment('담당자 ID (작성 단계는 null)');
|
||||
});
|
||||
|
||||
// 문서양식에 연결 필드 추가
|
||||
Schema::table('document_templates', function (Blueprint $table) {
|
||||
$table->json('linked_item_ids')->nullable()->after('is_active')
|
||||
->comment('수입검사 시 연결된 품목 ID 배열');
|
||||
$table->unsignedBigInteger('linked_process_id')->nullable()->after('linked_item_ids')
|
||||
->comment('품질검사 시 연결된 공정 ID');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('document_template_approval_lines', function (Blueprint $table) {
|
||||
$table->dropColumn('user_id');
|
||||
});
|
||||
|
||||
Schema::table('document_templates', function (Blueprint $table) {
|
||||
$table->dropColumn(['linked_item_ids', 'linked_process_id']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user