From 69a8e573ee57149fa53c5f78361dad05a013d338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Wed, 18 Mar 2026 12:19:36 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[tenant]=20AI=20=ED=86=A0=ED=81=B0=20?= =?UTF-8?q?=ED=95=9C=EB=8F=84=20=EC=BB=AC=EB=9F=BC=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A0=80=EC=9E=A5=EA=B3=B5=EA=B0=84=20100GB=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tenant.ai_token_limit 추가 (기본값 월 100만 토큰) - tenant.storage_limit 기본값 10GB → 100GB 변경 - 기존 10GB 테넌트를 100GB로 일괄 업데이트 --- ...i_token_limit_and_update_storage_limit.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 database/migrations/2026_03_18_100000_add_ai_token_limit_and_update_storage_limit.php diff --git a/database/migrations/2026_03_18_100000_add_ai_token_limit_and_update_storage_limit.php b/database/migrations/2026_03_18_100000_add_ai_token_limit_and_update_storage_limit.php new file mode 100644 index 00000000..48b73f37 --- /dev/null +++ b/database/migrations/2026_03_18_100000_add_ai_token_limit_and_update_storage_limit.php @@ -0,0 +1,45 @@ +bigInteger('ai_token_limit') + ->default(1000000) + ->after('storage_grace_period_until') + ->comment('월별 AI 토큰 한도 (기본 100만)'); + }); + + // 기존 storage_limit 기본값 10GB인 테넌트를 100GB로 변경 + DB::table('tenants') + ->where('storage_limit', 10737418240) // 10GB + ->update(['storage_limit' => 107374182400]); // 100GB + + // 새로 생성되는 테넌트의 기본값도 100GB로 변경 + DB::statement('ALTER TABLE tenants ALTER COLUMN storage_limit SET DEFAULT 107374182400'); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // storage_limit 기본값 복원 + DB::statement('ALTER TABLE tenants ALTER COLUMN storage_limit SET DEFAULT 10737418240'); + + Schema::table('tenants', function (Blueprint $table) { + $table->dropColumn('ai_token_limit'); + }); + } +};