From 84eb4f5ab4ee9401ef9a85cde17d3d7facd8f1f2 Mon Sep 17 00:00:00 2001 From: hskwon Date: Tue, 2 Dec 2025 22:08:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20global=5Fmenus=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=EA=B7=B8=EB=A0=88=EC=9D=B4=EC=85=98=EC=97=90=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=20=EC=A1=B4=EC=9E=AC=20=EC=B2=B4=ED=81=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 개발 서버에서 테이블 이미 존재 시 에러 발생 방지 - Schema::hasTable() 체크로 중복 생성 스킵 --- .../2025_12_02_150000_create_global_menus_table.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/database/migrations/2025_12_02_150000_create_global_menus_table.php b/database/migrations/2025_12_02_150000_create_global_menus_table.php index e2c6952..b96621f 100644 --- a/database/migrations/2025_12_02_150000_create_global_menus_table.php +++ b/database/migrations/2025_12_02_150000_create_global_menus_table.php @@ -20,7 +20,11 @@ { public function up(): void { - // 1. global_menus 테이블 생성 + // 1. global_menus 테이블 생성 (이미 존재하면 스킵) + if (Schema::hasTable('global_menus')) { + return; // 이미 테이블이 존재하면 마이그레이션 스킵 + } + Schema::create('global_menus', function (Blueprint $table) { $table->id()->comment('PK: 글로벌 메뉴 ID'); $table->unsignedBigInteger('parent_id')->nullable()->comment('상위 메뉴 ID');