From 8404f29bca36568d71072a01037ca04360b4a5b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Tue, 17 Mar 2026 11:00:06 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[account]=20=EA=B3=84=EC=A0=95=EA=B3=BC?= =?UTF-8?q?=EB=AA=A9=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=98=81?= =?UTF-8?q?=EB=AC=B8=20=ED=86=B5=EC=9D=BC=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 - 한글 카테고리(자산/부채/자본/수익/비용)를 영문(asset/liability/capital/revenue/expense)으로 변환 - API 표준에 맞춰 전체 테넌트 통일 --- ...nify_account_codes_category_to_english.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 database/migrations/2026_03_17_105822_unify_account_codes_category_to_english.php diff --git a/database/migrations/2026_03_17_105822_unify_account_codes_category_to_english.php b/database/migrations/2026_03_17_105822_unify_account_codes_category_to_english.php new file mode 100644 index 00000000..74e2ef91 --- /dev/null +++ b/database/migrations/2026_03_17_105822_unify_account_codes_category_to_english.php @@ -0,0 +1,52 @@ + 'asset', + '부채' => 'liability', + '자본' => 'capital', + '수익' => 'revenue', + '비용' => 'expense', + ]; + + foreach ($mapping as $korean => $english) { + DB::table('account_codes') + ->where('category', $korean) + ->update(['category' => $english]); + } + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + $mapping = [ + 'asset' => '자산', + 'liability' => '부채', + 'capital' => '자본', + 'revenue' => '수익', + 'expense' => '비용', + ]; + + // tenant_id=1만 원복 (다른 테넌트는 원래 영문) + foreach ($mapping as $english => $korean) { + DB::table('account_codes') + ->where('tenant_id', 1) + ->where('category', $english) + ->update(['category' => $korean]); + } + } +};