From f30fbadc90fda29ac0af8f73066602c97a95dc5d Mon Sep 17 00:00:00 2001 From: pro Date: Fri, 30 Jan 2026 15:15:53 +0900 Subject: [PATCH] =?UTF-8?q?fix:sales=5Fconsultations=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=EA=B7=B8=EB=A0=88=EC=9D=B4=EC=85=98=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=EC=A1=B4=EC=9E=AC=20=EC=B2=B4=ED=81=AC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 테이블이 없으면 건너뛰도록 수정 - 컬럼이 이미 존재하면 건너뛰도록 수정 Co-Authored-By: Claude Opus 4.5 --- ...3000_add_gcs_uri_to_sales_consultations.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/database/migrations/2026_01_29_093000_add_gcs_uri_to_sales_consultations.php b/database/migrations/2026_01_29_093000_add_gcs_uri_to_sales_consultations.php index 8ce6499..def11c3 100644 --- a/database/migrations/2026_01_29_093000_add_gcs_uri_to_sales_consultations.php +++ b/database/migrations/2026_01_29_093000_add_gcs_uri_to_sales_consultations.php @@ -11,6 +11,16 @@ */ public function up(): void { + // 테이블이 존재하지 않으면 건너뛰기 + if (!Schema::hasTable('sales_consultations')) { + return; + } + + // 컬럼이 이미 존재하면 건너뛰기 + if (Schema::hasColumn('sales_consultations', 'gcs_uri')) { + return; + } + Schema::table('sales_consultations', function (Blueprint $table) { $table->string('gcs_uri', 500)->nullable()->after('duration') ->comment('Google Cloud Storage URI (본사 연구용 백업)'); @@ -22,6 +32,14 @@ public function up(): void */ public function down(): void { + if (!Schema::hasTable('sales_consultations')) { + return; + } + + if (!Schema::hasColumn('sales_consultations', 'gcs_uri')) { + return; + } + Schema::table('sales_consultations', function (Blueprint $table) { $table->dropColumn('gcs_uri'); });