hotfix(chat): notification_enabled 컬럼 DEFAULT 누락 수정#119
Conversation
Closes #118 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@coderabbitai full review |
|
Warning Review limit reached
More reviews will be available in 58 minutes and 6 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA single-line update to the ChangesNotification enabled column SQL default
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Actions performedFull review triggered. |
ca5tlechan
left a comment
There was a problem hiding this comment.
✅ Approve — Blocking 없음
✅ 확인 사항
columnDefinition = "boolean NOT NULL DEFAULT true"추가 —ddl-auto=create/update시 Hibernate가 DEFAULT 포함 DDL을 생성해 기존 행 NOT NULL 제약 위반 방지 ✅@Builder.Default(true)자바 레벨 디폴트와 일치 ✅
⚠️ Non-blocking
nullable = false와 columnDefinition의 NOT NULL이 중복이나 무해합니다. ddl-auto=update + 이미 컬럼이 존재하는 DB에서는 columnDefinition이 기존 컬럼 정의를 변경하지 않으므로, 완전한 해결은 PR #103 리뷰에서 제안한 migration SQL(ALTER TABLE chat_room_members ADD COLUMN IF NOT EXISTS notification_enabled BOOLEAN NOT NULL DEFAULT TRUE)이 함께 있어야 합니다. 개발 환경(ddl-auto=create) 기준으로는 이 수정으로 충분합니다.
요약
ChatRoomMember.notification_enabled컬럼에columnDefinition = "boolean NOT NULL DEFAULT true"추가ALTER TABLE발행 시DEFAULT true포함 → Postgres가 기존 행을 자동으로true로 채움ChatRoomMemberINSERT 500 에러가 발생 중이었음Closes #118
변경 파일
capstone-domain/.../chat/entity/ChatRoomMember.java—@Columnannotation에columnDefinition추가 (1줄 변경)테스트 플랜
./gradlew compileJava통과./gradlew checkstyleMain—ChatRoomMember.java위반 0건 (선재 WARN 그대로)ALTER TABLE chat_room_members ADD COLUMN notification_enabled boolean NOT NULL DEFAULT true정상 실행 확인ensureGroupRoomForPost()경로 INSERT 정상 동작 확인🤖 Generated with Claude Code
Summary by CodeRabbit