From 628d902b0c27659ccc14513c5722b983df431753 Mon Sep 17 00:00:00 2001 From: hskwon Date: Wed, 26 Nov 2025 17:07:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20item=5Fsections.page=5Fid=20nullable=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 - 섹션 템플릿(is_template=true)은 특정 페이지에 속하지 않으므로 page_id가 null 허용 - section-templates API 500 에러 해결 --- ...age_id_nullable_in_item_sections_table.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 database/migrations/2025_11_26_170358_make_page_id_nullable_in_item_sections_table.php diff --git a/database/migrations/2025_11_26_170358_make_page_id_nullable_in_item_sections_table.php b/database/migrations/2025_11_26_170358_make_page_id_nullable_in_item_sections_table.php new file mode 100644 index 0000000..7ec7bdf --- /dev/null +++ b/database/migrations/2025_11_26_170358_make_page_id_nullable_in_item_sections_table.php @@ -0,0 +1,34 @@ +unsignedBigInteger('page_id')->nullable()->comment('페이지 ID (템플릿은 null)')->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('item_sections', function (Blueprint $table) { + $table->unsignedBigInteger('page_id')->nullable(false)->comment('페이지 ID')->change(); + }); + } +}; \ No newline at end of file