From 2779caed6eb04a27064024df5b37cae155714efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Tue, 3 Feb 2026 10:33:37 +0900 Subject: [PATCH] =?UTF-8?q?feat:=EB=AC=B8=EC=84=9C=EC=96=91=EC=8B=9D=20?= =?UTF-8?q?=EA=B2=B0=EC=9E=AC=EB=9D=BC=EC=9D=B8=20user=5Fid=20=EB=B0=8F=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0=20=ED=95=84=EB=93=9C=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=EA=B7=B8=EB=A0=88=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - document_template_approval_lines에 user_id 컬럼 추가 - document_templates에 linked_item_ids(JSON), linked_process_id 컬럼 추가 Co-Authored-By: Claude Opus 4.5 --- ...nd_linked_fields_to_document_templates.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 database/migrations/2026_02_03_110000_add_user_id_and_linked_fields_to_document_templates.php diff --git a/database/migrations/2026_02_03_110000_add_user_id_and_linked_fields_to_document_templates.php b/database/migrations/2026_02_03_110000_add_user_id_and_linked_fields_to_document_templates.php new file mode 100644 index 0000000..06b2073 --- /dev/null +++ b/database/migrations/2026_02_03_110000_add_user_id_and_linked_fields_to_document_templates.php @@ -0,0 +1,36 @@ +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']); + }); + } +};