From 58fedb0d43457e5246c98f86a67aa4c8f1adb29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Fri, 6 Mar 2026 20:51:38 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[approvals]=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EC=9D=B8=EA=B0=90=EA=B3=84=20=EC=96=91=EC=8B=9D=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EB=A7=88=EC=9D=B4=EA=B7=B8=EB=A0=88?= =?UTF-8?q?=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 - 모든 테넌트에 seal_usage 양식 자동 등록 --- .../2026_03_06_210000_add_seal_usage_form.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 database/migrations/2026_03_06_210000_add_seal_usage_form.php diff --git a/database/migrations/2026_03_06_210000_add_seal_usage_form.php b/database/migrations/2026_03_06_210000_add_seal_usage_form.php new file mode 100644 index 0000000..dac0400 --- /dev/null +++ b/database/migrations/2026_03_06_210000_add_seal_usage_form.php @@ -0,0 +1,38 @@ +whereNull('deleted_at')->pluck('id'); + + foreach ($tenants as $tenantId) { + $exists = DB::table('approval_forms') + ->where('tenant_id', $tenantId) + ->where('code', 'seal_usage') + ->exists(); + + if (! $exists) { + DB::table('approval_forms')->insert([ + 'tenant_id' => $tenantId, + 'name' => '사용인감계', + 'code' => 'seal_usage', + 'category' => 'certificate', + 'template' => '[]', + 'body_template' => '', + 'is_active' => true, + 'created_at' => now(), + 'updated_at' => now(), + ]); + } + } + } + + public function down(): void + { + DB::table('approval_forms')->where('code', 'seal_usage')->delete(); + } +};