Skip to content

Conversation

@jhan0121
Copy link
Owner

@jhan0121 jhan0121 commented Jan 2, 2026

🚀 작업 내용

배포 사전 작업으로 flyway 기반 db 마이그레이션 기능을 추가합니다.

📸 이슈 번호

✍ 궁금한 점

  • 안전하면서 효율적인 마이그레이션 과정을 더 알아보자

- 환경별 jpa sql 출력 여부 분리
@jhan0121 jhan0121 added this to the v1.0.0 milestone Jan 2, 2026
@jhan0121 jhan0121 requested a review from Copilot January 2, 2026 12:04
@jhan0121 jhan0121 self-assigned this Jan 2, 2026
@jhan0121 jhan0121 added BE Backend ✨ feat 기능 추가 labels Jan 2, 2026
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

🧪 테스트 커버리지 리포트

Overall Project 100% 🍏
Files changed 100% 🍏

File Coverage
ReviewCycle.java 100% 🍏
MemberController.java 100% 🍏
NotificationHistoryService.java 100% 🍏
ReviewService.java 100% 🍏
MemberService.java 100% 🍏
EmailSender.java 100% 🍏
ReviewEmailSender.java 100% 🍏
DeviceAuthEmailSender.java 100% 🍏
Email.java 100% 🍏

Copy link

Copilot AI left a 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 create to validate to 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.

Comment on lines +17 to +18
flyway:
enabled: true
Copy link

Copilot AI Jan 2, 2026

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.

Copilot uses AI. Check for mistakes.
jhan0121 and others added 4 commits January 2, 2026 21:18
* feat: 로그 기능 추가

* chore: 신규 유저 이메일 등록 시작 로그 태그명 수정

* feat: 이메일 마스킹 기능 적용

* refactor: 복습 주기 저장 로그 포맷 수정

* refactor: 이메일 전송 기능 도메인 객체 파라미터로 변경
@jhan0121 jhan0121 merged commit f67a53a into be/dev Jan 2, 2026
1 check passed
@jhan0121 jhan0121 deleted the be/feat/flyway branch January 2, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BE Backend ✨ feat 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants