feat: DB 마이그레이션 스크립트 추가#344
Conversation
- V1: 베이스라인 스키마 정의 - V2: PK/FK 타입 정렬 (int → bigint) - V3: varchar → enum 타입 변환 - V4: 제약조건 및 기본값 추가 - 검증 SQL 및 마이그레이션 가이드 문서 추가
Summary of ChangesHello @eunseo9311, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 데이터베이스 스키마를 체계적으로 관리하고 개선하기 위한 Flyway 마이그레이션 스크립트들을 도입합니다. 주요 변경사항으로는 기본 키와 외래 키의 데이터 타입을 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. DB 스키마 변경, 타입 맞추고 제약 걸어, 데이터는 안전히. Footnotes
|
There was a problem hiding this comment.
Code Review
DB 마이그레이션 스크립트와 상세한 가이드를 추가해주셔서 감사합니다. 전반적으로 매우 꼼꼼하게 작업되었으며, 특히 검증 스크립트와 문제 해결 가이드를 포함한 점이 인상적입니다. 리뷰 결과, 몇몇 스크립트에서 마이그레이션 실패를 유발할 수 있는 부분과 잠재적인 데이터 정합성 문제를 발견했습니다. run_validation.sh 스크립트의 결과 파일명 생성 로직, V4 스크립트의 중복된 UNIQUE 제약조건 추가, 그리고 V2 스크립트의 NOT NULL 제약조건 변경에 대한 수정이 필요해 보입니다. 자세한 내용은 각 파일의 리뷰 코멘트를 참고해주세요.
V1에 이미 college.name의 UNIQUE 제약조건이 존재하므로 V4에서 중복 추가하는 부분 제거
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
꼼꼼히 작업해 주셔서 감사합니다! 고생 많으셨어요!!
시간이 없어서 실행은 해보지 못했지만.. 큰 문제는 없어 보입니다. 백업을 떠놓고 하면 괜찮을거예요!
fyi) 추가적으로, 만약 마이그레이션이 실패한 경우.
DB 뿐만 아니라 서비스 자체가 죽을 수 있어요. DB를 복구한 이후에 revert후 재배포를 실행해 주어야 할 수 있습니다. ( 새벽에 진행을 하면 유저가 많이 없을거고 잠시 죽어 있어도 괜찮으니 너무 큰 걱정은 하지 마세요 )
Q. mysql 스냅샷 복구 같은 경우는 RDS에 있는 거라 스크립트로 실행이 되는지 확신이 있지는 않네요. 잘 안되면 aws cli에서 할 수 있어요. (RDS 메뉴에서)
Q. 혹시 yml 관련 변경 사항은 필요없이 baseline 실행이 가능한걸까요 (저도 yml 변화 없이 해본적이 없어서)!
flyway:
enabled: true
baseline-on-migrate: true
locations:
요런 것들이 딱히 안보여서요!
|
네 감사합니다! 용준님이랑 푸름님께서 주신 피드백 바탕으로 수정해보겠습니다! |
pooreumjung
left a comment
There was a problem hiding this comment.
application.yml 설정 확인했습니다~
About
#️⃣ Issue Number
#343
📝 요약(Summary)
💬 공유사항 to 리뷰어
푸름님과 용준님의 로컬에서 작업되는지 확인해주셨으면 합니다.
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.