-
Notifications
You must be signed in to change notification settings - Fork 0
flyway 기반 db 마이그레이션 의존성 추가 #24
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
Conversation
- 환경별 jpa sql 출력 여부 분리
🧪 테스트 커버리지 리포트
|
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.
Pull request overview
This PR adds Flyway-based database migration functionality to prepare for deployment. It transitions the application from Hibernate's auto-DDL mode to a migration-based approach for better database schema management in production environments.
Key changes:
- Adds Flyway dependencies and initial migration script with complete database schema
- Changes Hibernate DDL mode from
createtovalidateto ensure schema is managed by migrations - Splits JPA logging configuration into environment-specific profiles (local/prod)
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/db/migration/V20260102_1__init.sql | Initial Flyway migration script defining all database tables (member, device, review, review_cycle, notification_history) with proper constraints and relationships |
| src/main/resources/application.yaml | Enables Flyway, changes Hibernate DDL mode to validate, sets default profile to local, and moves SQL logging to profile-specific configs |
| src/main/resources/application-prod.yaml | Production profile configuration with SQL logging disabled |
| src/main/resources/application-local.yaml | Local profile configuration with SQL logging enabled for development |
| build.gradle | Adds flyway-core and flyway-mysql dependencies for migration support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| flyway: | ||
| enabled: true |
Copilot
AI
Jan 2, 2026
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.
Flyway is enabled in the main application configuration but not explicitly disabled in the test configuration. Since tests use H2 with ddl-auto: create-drop, you should explicitly disable Flyway in the test configuration to avoid potential conflicts. Add spring.flyway.enabled: false to src/test/resources/application.yaml to ensure tests continue to work properly with H2's schema auto-generation.
* feat: 로그 기능 추가 * chore: 신규 유저 이메일 등록 시작 로그 태그명 수정 * feat: 이메일 마스킹 기능 적용 * refactor: 복습 주기 저장 로그 포맷 수정 * refactor: 이메일 전송 기능 도메인 객체 파라미터로 변경
🚀 작업 내용
배포 사전 작업으로 flyway 기반 db 마이그레이션 기능을 추가합니다.
📸 이슈 번호
✍ 궁금한 점