Skip to content

[DEV-000] V36 flyway script 수정 #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2025
Merged

[DEV-000] V36 flyway script 수정 #244

merged 2 commits into from
Feb 7, 2025

Conversation

5uhwann
Copy link
Collaborator

@5uhwann 5uhwann commented Feb 7, 2025

🚀 작업 내용

  • sql 에러 발생을 유발하는 flyway script를 수정했습니다.

🤔 고민했던 내용

💬 리뷰 중점사항

Summary by CodeRabbit

  • Chores
    • 양식 데이터 처리 방식을 최적화하여 안정성과 효율성을 개선하였습니다. 이번 업데이트로 데이터 무결성이 향상되어 보다 원활한 사용자 경험을 기대할 수 있습니다.

@5uhwann 5uhwann added 🛠️버그 버그 제보 🎯리팩토링 리팩토링 및 고도화 이슈 D-0 labels Feb 7, 2025
@5uhwann 5uhwann self-assigned this Feb 7, 2025
Copy link

coderabbitai bot commented Feb 7, 2025

Walkthrough

본 PR은 form 테이블의 sections 컬럼의 데이터 타입을 TEXT에서 varchar(500)으로 변경하는 데이터베이스 마이그레이션 스크립트를 포함합니다. 컬럼은 NOT NULL 조건과 기본값 '[]'를 그대로 유지하면서 데이터 타입만 수정됩니다.

Changes

파일 변경 내용
src/.../V36__form_add_column_sections.sql form 테이블의 sections 컬럼 데이터 타입 변경: TEXT → varchar(500), NOT NULL 및 default '[]' 유지

Suggested reviewers

  • wonjunYou
  • KoSeonJe

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c899d11 and cd3c90e.

📒 Files selected for processing (1)
  • src/main/resources/db/migration/V36__form_add_column_sections.sql (1 hunks)
🔇 Additional comments (1)
src/main/resources/db/migration/V36__form_add_column_sections.sql (1)

1-1: 컬럼 추가 관련 스크립트 검토 및 제안

현재 스크립트는 form 테이블에 'sections' 컬럼을 varchar(500) 타입으로 추가하며, NOT NULL 제약조건과 기본값 '[]'를 지정하고 있습니다.
하지만 PR 요약에서는 기존 TEXT 타입의 'sections' 컬럼을 수정한다고 되어 있어, 의도와 실제 스크립트 동작 간에 불일치가 있을 수 있습니다.

  • 만약 해당 컬럼이 이미 존재하는 경우라면, ALTER COLUMN 구문을 사용하여 데이터 타입을 변경하는 것이 맞습니다.
  • 반대로 컬럼이 없는 경우라면, 안전성을 위해 "IF NOT EXISTS" 조건을 추가하는 것도 고려해볼 만합니다.

예시 diff (컬럼이 없는 경우라면):

-ALTER TABLE form ADD COLUMN sections varchar(500) NOT NULL default '[]';
+ALTER TABLE form ADD COLUMN IF NOT EXISTS sections varchar(500) NOT NULL default '[]';

추가로, 의도하신 동작(기존 컬럼 수정 vs 신규 컬럼 추가)을 확인 후 스크립트를 조정하시길 바랍니다.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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.

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
Collaborator

@Seooooo24 Seooooo24 left a comment

Choose a reason for hiding this comment

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

감사합니다!

@Seooooo24 Seooooo24 merged commit 198b7b7 into develop Feb 7, 2025
1 of 2 checks passed
@Seooooo24 Seooooo24 deleted the refactor/DEV-000 branch February 7, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-0 🎯리팩토링 리팩토링 및 고도화 이슈 🛠️버그 버그 제보
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants