feat: 아이템 정보 테이블 PK 변경#65
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR changes the item_info table's primary key from a single column (name) to a composite key (name, sub_category, top_category) after discovering that item names are not unique in the game data. Additionally, a typo in the ItemCategory enum ("소모폼" → "소모품") was corrected.
Key Changes
- Introduced
ItemInfoIdas an embeddable composite primary key class - Updated JPA repository query methods to use composite key field paths (
findByIdTopCategory,findByIdSubCategory) - Fixed typo in ItemCategory enum from "소모폼" to "소모품"
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ItemInfoId.java | New embeddable composite key class containing name, subCategory, and topCategory |
| ItemInfo.java | Replaced individual ID fields with EmbeddedId and added helper methods for backward compatibility |
| ItemInfoJpaRepository.java | Updated generic type parameter and query method names to use composite key paths |
| ItemInfoRepositoryPortImpl.java | Updated method calls to use new query method names |
| V10__alter_item_info_pk.sql | Database migration script to alter primary key constraint |
| ItemCategory.java | Corrected typo in category names from "소모폼" to "소모품" |
| ItemInfoServiceTest.java | Added comprehensive unit tests for ItemInfoService methods |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
✅ 테스트 결과 for PRBuild: success 🧪 테스트 실행 with Gradle |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 상세 설명
기타 소모폼이라고 오타가 있어 수정기타 소모품으로 수정📊 체크리스트
📆 마감일