-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] Restaurant, RestaurantSection 테이블 컬럼 추가 #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
9 changes: 9 additions & 0 deletions
9
src/main/resources/db/migration/V31__add_restaurant_and_section_columns.sql
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
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,9 @@ | ||||||||
| ALTER TABLE restaurants ADD COLUMN menu VARCHAR(100); | ||||||||
| ALTER TABLE restaurants ADD COLUMN description VARCHAR(255); | ||||||||
| ALTER TABLE restaurants ADD COLUMN map_url TEXT; | ||||||||
| ALTER TABLE restaurants ADD COLUMN blog_url TEXT; | ||||||||
|
|
||||||||
| ALTER TABLE restaurant_sections ADD COLUMN menu VARCHAR(100); | ||||||||
| ALTER TABLE restaurant_sections ADD COLUMN description VARCHAR(255); | ||||||||
| ALTER TABLE restaurant_sections ADD COLUMN map_url TEXT; | ||||||||
| ALTER TABLE restaurant_sections ADD COLUMN blog_url TEXT; | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 파일의 마지막에 개행 문자(newline)가 없습니다. POSIX 표준에 따르면 텍스트 파일은 개행 문자로 끝나야 하며, 이를 따르는 것이 일반적인 컨벤션입니다. Git, cat 등 일부 도구는 마지막 줄에 개행 문자가 없을 경우 예기치 않게 동작할 수 있습니다. 파일 끝에 개행 문자를 추가해주세요.
Suggested change
|
||||||||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RestaurantSection엔티티에menu,description,mapUrl,blogUrl필드를 추가하는 것은 데이터 모델링 관점에서 재검토가 필요합니다.RestaurantSection은List<Restaurant>를 통해 여러Restaurant를 포함하는 집합의 역할을 합니다.Restaurant엔티티에도 동일한 필드가 존재하므로,RestaurantSection에 이 필드들을 추가하면 다음과 같은 문제가 발생할 수 있습니다.RestaurantSection의menu가 무엇을 의미하는지 불분명합니다. (예: 섹션 내 모든 식당의 메뉴 요약? 대표 식당의 메뉴?)이러한 필드들은 개별 식당의 고유한 속성이므로
Restaurant엔티티에만 유지하는 것이 더 명확하고 유지보수하기 좋은 설계입니다.따라서
RestaurantSection엔티티와V31마이그레이션 파일에서restaurant_sections테이블에 컬럼을 추가하는 부분을 함께 제거하는 것을 권장합니다.