Skip to content

refactor: application 엔티티 미사용 컬럼 제거#805

Merged
whqtker merged 1 commit into
developfrom
refactor/drop-legacy-application-choice-columns
Jun 29, 2026
Merged

refactor: application 엔티티 미사용 컬럼 제거#805
whqtker merged 1 commit into
developfrom
refactor/drop-legacy-application-choice-columns

Conversation

@whqtker

@whqtker whqtker commented Jun 27, 2026

Copy link
Copy Markdown
Member

관련 이슈

작업 내용

application 테이블에 남아 있는 미사용 컬럼 제거합니다.
자바 엔티티는 코드 변경사항 없습니다.

특이 사항

리뷰 요구사항 (선택)

@whqtker whqtker self-assigned this Jun 27, 2026
@whqtker whqtker requested a review from sukangpunch as a code owner June 27, 2026 10:25
@whqtker whqtker added the 최종 리뷰 최소 1명 필수 label Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

  1. 레거시 choice 컬럼 정리
    • application 테이블에서 first/second/third choice 관련 외래키 3개, 인덱스 3개, 컬럼 3개를 삭제하는 마이그레이션이 추가되었습니다.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • wibaek
  • lsy1307
  • Gyuhyeok99
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 application 테이블의 미사용 컬럼 제거라는 핵심 변경을 정확히 담고 있어 변경사항과 잘 맞습니다.
Description check ✅ Passed 필수 섹션(관련 이슈, 작업 내용, 특이 사항, 리뷰 요구사항)이 모두 포함되어 있고, 변경 요약도 있어 템플릿을 대체로 충족합니다.
Linked Issues check ✅ Passed application 테이블의 미사용 컬럼과 관련 FK·인덱스를 삭제했고, 자바 엔티티는 변경하지 않아 이슈 #804 요구와 일치합니다.
Out of Scope Changes check ✅ Passed 마이그레이션 외의 별도 변경이 없고, 이슈 범위 밖의 코드 변경도 보이지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/drop-legacy-application-choice-columns

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@whqtker whqtker changed the title chore: application 엔티티 미사용 컬럼 제거 refactor: application 엔티티 미사용 컬럼 제거 Jun 27, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/main/resources/db/migration/V56__drop_legacy_application_choice_columns.sql (1)

1-13: 📐 Maintainability & Code Quality | 🔵 Trivial

4. 마이그레이션 안전성: IF EXISTS 미적용

DROP FOREIGN KEY, DROP INDEX, DROP COLUMNIF 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

📥 Commits

Reviewing files that changed from the base of the PR and between 57a5b8a and 0920258.

📒 Files selected for processing (1)
  • src/main/resources/db/migration/V56__drop_legacy_application_choice_columns.sql

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +11 to +13
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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@whqtker whqtker merged commit adcfb23 into develop Jun 29, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

리팩터링 최종 리뷰 최소 1명 필수

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: application 미사용 컬럼 삭제

2 participants