Skip to content

Conversation

@nayonsoso
Copy link
Collaborator

관련 이슈

작업 내용

회의에서 논의된 내용에 따라 컬럼명을 exchange_student로 바꿉니다.
JSON key 의 이름은 JsonProperty 를 사용하여 유지합니다.

@coderabbitai
Copy link

coderabbitai bot commented Jun 28, 2025

Walkthrough

  1. PreparationStatusExchangeStatus로 이름이 변경되었습니다.

    • 관련 enum 파일의 이름이 바뀌었고, 내부 상수는 그대로 유지되었습니다.
  2. SiteUser 클래스의 필드와 생성자에서 preparationStageexchangeStatus로 변경되었습니다.

    • 타입 역시 PreparationStatus에서 ExchangeStatus로 바뀌었습니다.
  3. SignUpRequest DTO에서 필드 타입이 PreparationStatus에서 ExchangeStatus로 변경되었습니다.

    • JSON 직렬화 호환을 위해 @JsonProperty("preparationStatus") 어노테이션이 추가되었습니다.
    • 내부 변환 메서드(toOAuthSiteUser, toEmailSiteUser)도 변경된 필드명을 사용하도록 수정되었습니다.
  4. 데이터베이스 마이그레이션 스크립트(V18__rename_preparation_status.sql)가 추가되어,

    • site_user 테이블의 preparation_stage 컬럼이 exchange_status로 이름이 바뀌었습니다.
  5. 테스트 코드 전반에서 PreparationStatus 관련 import와 사용이 ExchangeStatus로 일괄 변경되었습니다.

    • 테스트 데이터 생성 시에도 새로운 enum과 필드명이 반영되었습니다.
  6. src/main/resources/secret 파일에서 서브프로젝트 커밋 해시가 갱신되었습니다.

    • 다른 내용의 변경은 없습니다.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c587fef and b1305bf.

📒 Files selected for processing (1)
  • src/main/resources/db/migration/V18__rename_preparation_status.sql (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/main/resources/db/migration/V18__rename_preparation_status.sql
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

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

1-1: 2. 데이터베이스 스키마 변경이 적절하게 구현되었습니다

- preparation_stage에서 exchange_status로의 컬럼명 변경이 domain model 변경과 일치합니다
- 단순하고 명확한 ALTER TABLE 구문으로 안전하게 처리되었습니다
- 만약 롤백이 필요한 경우를 대비해 역방향 마이그레이션 계획도 고려해두시면 좋겠습니다
src/test/java/com/example/solidconnection/e2e/DynamicFixture.java (1)

14-14: 8. 동적 픽스처에서 새로운 enum 사용이 일관되게 적용되었습니다

- ExchangeStatus.CONSIDERING을 사용하도록 적절히 변경되었습니다
- TODO 주석에 언급된 대로 향후 test fixture 개선 작업 시 이 클래스 삭제를 고려해주세요
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45430c9 and cada438.

📒 Files selected for processing (8)
  • src/main/java/com/example/solidconnection/auth/dto/SignUpRequest.java (4 hunks)
  • src/main/java/com/example/solidconnection/siteuser/domain/ExchangeStatus.java (1 hunks)
  • src/main/java/com/example/solidconnection/siteuser/domain/SiteUser.java (4 hunks)
  • src/main/resources/db/migration/V17__rename_preparation_status.sql (1 hunks)
  • src/test/java/com/example/solidconnection/e2e/DynamicFixture.java (2 hunks)
  • src/test/java/com/example/solidconnection/security/authentication/SiteUserAuthenticationTest.java (2 hunks)
  • src/test/java/com/example/solidconnection/siteuser/fixture/SiteUserFixtureBuilder.java (2 hunks)
  • src/test/java/com/example/solidconnection/siteuser/repository/SiteUserRepositoryTest.java (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (12)
src/main/java/com/example/solidconnection/siteuser/domain/ExchangeStatus.java (1)

3-9: 1. 체계적인 enum 이름 변경 작업이 잘 수행되었습니다

- PreparationStatus에서 ExchangeStatus로의 이름 변경이 명확하고 의미있게 처리되었습니다
- enum 상수들이 그대로 유지되어 기존 데이터와의 호환성이 보장됩니다
- 마지막 상수 뒤의 trailing comma 추가는 향후 새로운 상수 추가 시 git diff를 깔끔하게 유지하는 좋은 관례입니다
src/test/java/com/example/solidconnection/siteuser/fixture/SiteUserFixtureBuilder.java (2)

4-4: 3. import 문이 새로운 enum으로 정확히 업데이트되었습니다

- PreparationStatus에서 ExchangeStatus로의 import 변경이 올바르게 처리되었습니다

65-65: 4. 테스트 픽스처에서 enum 사용이 일관되게 업데이트되었습니다

- ExchangeStatus.CONSIDERING을 기본값으로 사용하는 것이 적절합니다
- 테스트 데이터 생성 로직이 새로운 enum과 일치하게 변경되었습니다
src/test/java/com/example/solidconnection/siteuser/repository/SiteUserRepositoryTest.java (2)

4-4: 5. 리포지토리 테스트의 import가 올바르게 업데이트되었습니다

- ExchangeStatus로의 import 변경이 정확히 처리되었습니다

86-86: 6. 테스트 헬퍼 메서드가 새로운 enum을 적절히 사용합니다

- createSiteUser 메서드에서 ExchangeStatus.CONSIDERING을 사용하도록 일관되게 변경되었습니다
- 기존 테스트 로직의 의도가 그대로 유지되었습니다
src/test/java/com/example/solidconnection/e2e/DynamicFixture.java (1)

3-3: 7. E2E 테스트 픽스처의 import가 정확히 변경되었습니다

- ExchangeStatus로의 import 업데이트가 올바르게 처리되었습니다
src/test/java/com/example/solidconnection/security/authentication/SiteUserAuthenticationTest.java (1)

4-4: 테스트 코드 업데이트가 올바르게 적용되었습니다.

  1. import문이 ExchangeStatus로 정확히 변경됨
  2. 테스트 헬퍼 메서드에서도 새로운 enum 값 사용

변경사항이 일관되게 적용되어 좋습니다.

Also applies to: 66-66

src/main/java/com/example/solidconnection/siteuser/domain/SiteUser.java (2)

67-67: 도메인 모델의 필드명 변경이 올바르게 적용되었습니다.

preparationStage에서 exchangeStatus로의 필드명 변경이 적절합니다.


97-109: 변경사항 요약

  1. 생성자들의 매개변수명이 ExchangeStatus exchangeStatus로 일관되게 업데이트되었습니다.
  2. 필드 할당도 모두 this.exchangeStatus = exchangeStatus 형태로 동일하게 반영되었습니다.
  3. 총 세 개의 생성자에 동일한 수정사항이 적용된 것을 확인했습니다.
  4. 마이그레이션 파일(src/main/resources/db/migration/V17__rename_preparation_status.sql)이 존재함을 확인했습니다.

데이터베이스에 해당 마이그레이션이 실제로 적용되었는지 한 번 더 검증해 주세요.

src/main/java/com/example/solidconnection/auth/dto/SignUpRequest.java (3)

4-4: 필요한 import문이 올바르게 추가되었습니다.

  1. ExchangeStatus import 추가
  2. @JsonProperty 어노테이션을 위한 Jackson import 추가

적절한 의존성 추가입니다.

Also applies to: 7-7


17-18: JSON 호환성을 유지하면서 내부 필드명을 개선한 우수한 접근 방식입니다.

  1. 필드명을 exchangeStatus로 변경하여 의미를 명확히 함
  2. @JsonProperty("preparationStatus") 어노테이션으로 기존 API 호환성 유지
  3. 클라이언트 코드 수정 없이 내부 구조 개선 가능

이런 방식의 점진적 리팩토링이 매우 바람직합니다.


25-34: 1. 검색 결과

  • rg "PreparationStatus" 명령으로는 어떠한 참조도 찾아지지 않았습니다.
  1. 검증 요청
    • 혹시 숨어있는 참조가 있을 수 있으니, 코드베이스 전반에서 PreparationStatus가 완전히 제거되었는지 수동으로 한 번 더 확인 부탁드립니다.

Copy link
Member

@whqtker whqtker left a comment

Choose a reason for hiding this comment

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

빠른 변경 좋습니다 !!!!!

@@ -0,0 +1 @@
ALTER TABLE site_user RENAME COLUMN preparation_stage TO exchange_status; No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

개행 추가해주시면 될 것 같습니다 !

Copy link
Collaborator Author

@nayonsoso nayonsoso Jun 28, 2025

Choose a reason for hiding this comment

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

허걱 이런 실수를 하다니... 😞
꼼꼼한 리뷰 감사드립니다!!

- PreparationStatus -> ExchangeStudentStatus
chore: 컬럼명 변경 flyway 스크립트 추가
@nayonsoso nayonsoso force-pushed the refactor/350-rename-preparation-status branch from cada438 to c587fef Compare June 28, 2025 13:53
Copy link
Contributor

@Gyuhyeok99 Gyuhyeok99 left a comment

Choose a reason for hiding this comment

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

확인했습니다!

@@ -0,0 +1 @@
ALTER TABLE site_user RENAME COLUMN preparation_stage TO exchange_status;
Copy link
Contributor

@Gyuhyeok99 Gyuhyeok99 Jun 29, 2025

Choose a reason for hiding this comment

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

이전 Pr에 V17V18이 있는 거 같은데 19로 고쳐야할 거 같아요!

Copy link
Collaborator Author

@nayonsoso nayonsoso Jun 29, 2025

Choose a reason for hiding this comment

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

어떤게 빨리 approve 될지 몰라서 가장 최신 버전으로 등록해두었습니다.
머지할 때 맞추려고요!

제 생각을 미리 공유드렸어야 했는데 속으로만 생각했네요.. 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

아하 그렇군요!! 다시 approve했습니다!

Copy link
Contributor

@lsy1307 lsy1307 left a comment

Choose a reason for hiding this comment

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

확인했습니다!

Copy link
Member

@whqtker whqtker left a comment

Choose a reason for hiding this comment

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

개행 추가 확인했습니다 !

nayonsoso added 2 commits July 1, 2025 17:00
…e-preparation-status

# Conflicts:
#	src/test/java/com/example/solidconnection/e2e/DynamicFixture.java
@nayonsoso nayonsoso merged commit 5a006a4 into solid-connection:develop Jul 1, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: 회원의 '교환학생 상태' 컬럼명을 바꾼다.

4 participants