fix: 미션 초기 데이터 자동 로드 (오늘의 미션 500 근본 원인 해결) - #26
Merged
Conversation
PostgreSQL 은 spring.sql.init.mode 가 없으면 data.sql 을 실행하지 않는다. 그래서 배포 DB(RDS)의 mission 테이블이 비어 GET /api/missions/today 가 500(미션 데이터 없음)을 냈다. - spring.sql.init.mode=always 추가 (defer-datasource-initialization 은 이미 있음) - data.sql 을 확정된 30개 미션으로 교체, 삽입 후 시퀀스 setval - ON CONFLICT (id) DO NOTHING 이라 매 기동 실행돼도 중복/덮어쓰기 없음 검증: 빈 DB 로 bootRun 시 미션 30개 자동 적재 확인. clean build 통과. (테스트는 test 프로파일이라 data.sql 을 로드하지 않아 영향 없음) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSpring SQL 초기화를 매 기동 시 실행하도록 설정하고, 미션 초기 데이터를 대량 삽입 방식으로 확장했습니다. 중복 삽입을 방지하며, 미션 ID 시퀀스를 현재 최대 ID에 맞춥니다. Changes미션 초기화
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
PostgreSQL 은 spring.sql.init.mode 가 없으면 data.sql 을 실행하지 않는다. 그래서 배포 DB(RDS)의 mission 테이블이 비어 GET /api/missions/today 가 500(미션 데이터 없음)을 냈다.
검증: 빈 DB 로 bootRun 시 미션 30개 자동 적재 확인. clean build 통과. (테스트는 test 프로파일이라 data.sql 을 로드하지 않아 영향 없음)
Summary by CodeRabbit
새 기능
버그 수정