[DP-467] post_type NULL 마이그레이션 — 기존 게시글 AI 답변 섹션 미표시 버그 수정#164
Merged
github-actions[bot] merged 1 commit intoMay 7, 2026
Merged
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
post_type컬럼 추가 전 생성된 기존 게시글의post_type이 NULL → 프론트에서 AI 답변 섹션 미표시data.sql에 idempotent DO $$ 블록 추가: NULL 행을TECH로 백필 후 NOT NULL 제약 적용Post.java)는 이미@Column(nullable = false)선언되어 있어 코드 변경 불필요Root Cause
ddl-auto: update는 신규 컬럼 추가 시 기존 row를 NULL로 남김 →PostDetailResponse에postType: null직렬화 → 프론트 조건postType === "TECH"false → AI 서버 미호출Migration (data.sql — 앱 시작 시 자동 실행, idempotent)
Test plan
./gradlew build --no-daemon통과 (빌드 + 테스트 전체)data.sqlDO $$ 블록은 이미 존재하는 패턴(DP-462)과 동일 방식 — idempotent 보장