Skip to content

[fix] #288 운영 환경의 안정성을 위한 yml 파일 수정#289

Merged
choyeongju merged 2 commits intodevelopfrom
fix/288
Sep 30, 2025
Merged

[fix] #288 운영 환경의 안정성을 위한 yml 파일 수정#289
choyeongju merged 2 commits intodevelopfrom
fix/288

Conversation

@choyeongju
Copy link
Member

@choyeongju choyeongju commented Sep 28, 2025

Related issue 🛠

Work Description ✏️

  • Presigned URL 기반 업로드로 전환하면서 spring.servlet.multipart 설정 제거
  • 환경별 설정을 .env 파일로 분리
    • dev 환경:
      • spring.jpa.hibernate.ddl-auto=update
      • hibernate.show_sql/format_sql=true → 개발 시 SQL 로그 확인 가능
    • prod 환경:
      • spring.jpa.hibernate.ddl-auto=validate
      • hibernate.show_sql/format_sql=false → 운영 로그 최소화
  • spring.sql.init.mode: never
    • → schema.sql, data.sql 자동 실행 차단
  • 향후 마이그레이션 툴 도입 필요
    • Flyway/Liquibase 도입해 DB 스키마 변경 이력을 안전하게 관리
    • prod 환경은 .env로 ddl-auto=validate 고정, 스키마 변경은 마이그레이션 스크립트 기반으로만 진행

Uncompleted Tasks 😅

  • Flyway/Liquibase 도입

To Reviewers 📢

  • 이번 수정은 prod 환경에서 DB 스키마가 의도치 않게 변경, 삭제되는 문제를 예방하기 위한 최소한의 안전 조치입니다.
  • prod 환경에서는 스키마가 자동 변경되지 않도록 ddl-auto=validate로 제한했고, dev/test에서는 개발 편의를 위해 update를 유지합니다.
  • 마이그레이션 툴을 도입하면 prod 환경은 반드시 스크립트 기반으로만 스키마 변경을 진행할 예정입니다.

@choyeongju choyeongju self-assigned this Sep 28, 2025
@choyeongju choyeongju added the 🔧FIX🔧 Something isn't working label Sep 28, 2025
@choyeongju choyeongju requested a review from a team as a code owner September 28, 2025 10:08
Copy link
Collaborator

@Sihun23 Sihun23 left a comment

Choose a reason for hiding this comment

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

확인했습니다. 고생하셨습니다!

jpa:
hibernate:
ddl-auto: update
ddl-auto: validate
Copy link
Collaborator

Choose a reason for hiding this comment

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

validate라는게 있는지 첨 알았심
최고에요 ㅠ,,ㅠ

@choyeongju choyeongju merged commit 0b57e37 into develop Sep 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐰영주🐰 🔧FIX🔧 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] application.yml 파일 변경

3 participants