-
Notifications
You must be signed in to change notification settings - Fork 2
[FIX] gameResult, room 테이블 수정 #101
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
The head ref may contain hidden characters: "FIX-\uBC29\uC0AD\uC81C"
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ALTER TABLE game_result | ||
| DROP CONSTRAINT FK_GAME_RESULT_ROOM; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,4 @@ | ||||||||||||||||||||||||||||||||
| DELETE | ||||||||||||||||||||||||||||||||
| FROM room | ||||||||||||||||||||||||||||||||
| WHERE id = '00000000-0000-0000-0000-000000000000'; | ||||||||||||||||||||||||||||||||
| COMMIT; | ||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+4
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. 마이그레이션 로직이 커밋 메시지 및 의도와 불일치합니다. 커밋 메시지에서는 "삭제된 방의 전적을 보관할 더미 데이터 생성"이라고 명시했지만, 이 마이그레이션은
다음 중 하나로 수정이 필요합니다:
🔎 제안하는 수정 방안-DELETE
-FROM room
-WHERE id = '00000000-0000-0000-0000-000000000000';
-COMMIT;
+INSERT INTO room (id, host_user_id, current_user_cnt, max_user_cnt, room_name, room_password, created_at)
+VALUES (
+ '00000000-0000-0000-0000-000000000000',
+ '00000000-0000-0000-0000-000000000000',
+ 0,
+ 0,
+ '[DELETED]',
+ NULL,
+ CURRENT_TIMESTAMP
+);
+COMMIT;참고: 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||
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.
DELETED_ROOM_ID상수가 데이터베이스에 존재하는 더미 방을 전제로 합니다.이 상수는 삭제된 방의 게임 결과를 보관하기 위한 플레이스홀더로 사용됩니다. 그러나
V8__insert_room.sql마이그레이션이 현재 이 UUID의 방을 삭제하고 있어, 실제로는 존재하지 않는 방을 참조하게 됩니다.V8 마이그레이션을 수정하여 이 UUID로 더미 방을 생성(INSERT)하도록 변경해야 합니다.
🤖 Prompt for AI Agents