From c32d68f0699e31ebca9f8b8e12bbd9287065af31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Fri, 27 Feb 2026 23:17:03 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[approval]=20=EA=B2=B0=EC=9E=AC?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=20Phase=201=20=EB=A7=88=EC=9D=B4=EA=B7=B8?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - approvals 테이블: line_id, body, is_urgent, department_id 컬럼 추가 - approval_steps 테이블: approver_name, approver_department, approver_position 스냅샷 컬럼 추가 --- ..._100001_add_columns_to_approvals_table.php | 37 +++++++++++++++++++ ...02_add_columns_to_approval_steps_table.php | 33 +++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 database/migrations/2026_02_27_100001_add_columns_to_approvals_table.php create mode 100644 database/migrations/2026_02_27_100002_add_columns_to_approval_steps_table.php diff --git a/database/migrations/2026_02_27_100001_add_columns_to_approvals_table.php b/database/migrations/2026_02_27_100001_add_columns_to_approvals_table.php new file mode 100644 index 0000000..8fc2dca --- /dev/null +++ b/database/migrations/2026_02_27_100001_add_columns_to_approvals_table.php @@ -0,0 +1,37 @@ +foreignId('line_id')->nullable()->after('form_id') + ->constrained('approval_lines')->nullOnDelete() + ->comment('결재선 템플릿 ID'); + $table->longText('body')->nullable()->after('content') + ->comment('본문 내용'); + $table->boolean('is_urgent')->default(false)->after('status') + ->comment('긴급 여부'); + $table->unsignedBigInteger('department_id')->nullable()->after('drafter_id') + ->comment('기안 부서 ID'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('approvals', function (Blueprint $table) { + $table->dropForeign(['line_id']); + $table->dropColumn(['line_id', 'body', 'is_urgent', 'department_id']); + }); + } +}; diff --git a/database/migrations/2026_02_27_100002_add_columns_to_approval_steps_table.php b/database/migrations/2026_02_27_100002_add_columns_to_approval_steps_table.php new file mode 100644 index 0000000..99e0fa8 --- /dev/null +++ b/database/migrations/2026_02_27_100002_add_columns_to_approval_steps_table.php @@ -0,0 +1,33 @@ +string('approver_name', 50)->nullable()->after('approver_id') + ->comment('결재자명 스냅샷'); + $table->string('approver_department', 100)->nullable()->after('approver_name') + ->comment('결재자 부서 스냅샷'); + $table->string('approver_position', 50)->nullable()->after('approver_department') + ->comment('결재자 직급 스냅샷'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('approval_steps', function (Blueprint $table) { + $table->dropColumn(['approver_name', 'approver_department', 'approver_position']); + }); + } +};