refactor: application 엔티티 미사용 컬럼 제거#805
Conversation
Walkthrough
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/resources/db/migration/V56__drop_legacy_application_choice_columns.sql (1)
1-13: 📐 Maintainability & Code Quality | 🔵 Trivial4. 마이그레이션 안전성: IF EXISTS 미적용
DROP FOREIGN KEY,DROP INDEX,DROP COLUMN에IF EXISTS가 없어요. Flyway 마이그레이션이 중간에 실패하거나 재실행 환경에서 문제가 생길 수 있어요. 다만 V56이 신규라 표준 환경에서는 큰 이슈가 아닐 수 있어요.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main/resources/db/migration/V56__drop_legacy_application_choice_columns.sql` around lines 1 - 13, The V56 migration drops foreign keys, indexes, and columns in application without existence checks, so make it resilient for reruns or partial states. Update the ALTER TABLE and DROP INDEX statements to use IF EXISTS where supported, and keep the legacy application choice removals aligned with the existing fk_application_first_choice_university_info_for_apply_id, idx_app_first_choice_term_id_search, and first_choice_university_info_for_apply_id symbols so the migration can safely no-op when objects are already gone.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@src/main/resources/db/migration/V56__drop_legacy_application_choice_columns.sql`:
- Around line 1-13: The V56 migration drops foreign keys, indexes, and columns
in application without existence checks, so make it resilient for reruns or
partial states. Update the ALTER TABLE and DROP INDEX statements to use IF
EXISTS where supported, and keep the legacy application choice removals aligned
with the existing fk_application_first_choice_university_info_for_apply_id,
idx_app_first_choice_term_id_search, and
first_choice_university_info_for_apply_id symbols so the migration can safely
no-op when objects are already gone.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0a56efec-d7ca-45fc-a663-9da4c7e067c5
📒 Files selected for processing (1)
src/main/resources/db/migration/V56__drop_legacy_application_choice_columns.sql
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09202588c0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| DROP COLUMN first_choice_university_info_for_apply_id, | ||
| DROP COLUMN second_choice_university_info_for_apply_id, | ||
| DROP COLUMN third_choice_university_info_for_apply_id; |
There was a problem hiding this comment.
Backfill choices before dropping legacy columns
In databases that already contain applications created before the application_choice table was introduced, the repo migrations never copy first_choice_university_info_for_apply_id, second_choice_university_info_for_apply_id, or third_choice_university_info_for_apply_id into application_choice (checked V50 through V55, and current queries read only Application.choices). Dropping these columns here permanently discards those users' stored choices; add an INSERT INTO application_choice ... SELECT ... FROM application backfill for each non-null choice order before the drop.
Useful? React with 👍 / 👎.
관련 이슈
작업 내용
application 테이블에 남아 있는 미사용 컬럼 제거합니다.
자바 엔티티는 코드 변경사항 없습니다.
특이 사항
리뷰 요구사항 (선택)