feat(stats): 탈퇴 사유 독립 보존과 통계 전환 - #240
Merged
Merged
Conversation
withdrawal_events와 withdrawal_event_reasons를 추가해 계정 하드 삭제 시 사용자 연결만 제거하고 탈퇴 이벤트를 보존하도록 함. 기존 user_withdrawal_reasons를 이벤트 단위로 이관하고 1년 만료일, 중복 사유 및 유효기간 제약을 PostgreSQL 통합 테스트로 검증함
기존 통계 호환을 위한 레거시 사유와 신규 탈퇴 이벤트·사유의 트랜잭션 단위 이중 저장, 신규 저장 실패 시 사용자 탈퇴 상태와 전체 사유 기록 롤백 검증
탈퇴 통계 조회를 withdrawal_events와 withdrawal_event_reasons 기준으로 전환하고 만료 이벤트 제외, 이벤트 단위 최신 목록, 계정 연결 제거 시 custom_reason 비노출을 적용함. 하드 삭제 이후 집계 유지와 화면의 최대 1년 보존 범위 안내를 PostgreSQL 및 MVC 테스트로 검증함
탈퇴 요청 14일 경과 시 withdrawal_events의 user_id와 withdrawal_event_reasons의 custom_reason을 제거하고 anonymized_at을 기록하며, 전환기 user_withdrawal_reasons와 1년 만료 이벤트를 정리하도록 추가함. 기존 데이터 정리 migration과 멱등 실행·중간 실패 전체 롤백을 검증하는 PostgreSQL 테스트를 추가함
신규 탈퇴 요청의 저장 경로를 withdrawal_events와 withdrawal_event_reasons로 단일화함. 롤백 호환성과 잔여 데이터 정리를 위해 기존 테이블은 유지하고 DB 설명에 레거시 상태와 대체 저장소를 명시함
Collaborator
|
LGTM!! |
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)
주요 변경사항
탈퇴 이벤트 저장 구조
withdrawal_events,withdrawal_event_reasons테이블과 도메인 엔티티를 추가했습니다.개인정보 보존 및 정리
통계 조회 및 관리자 화면
레거시 호환성
user_withdrawal_reasons신규 쓰기는 중단했습니다.테스트
검증
.\gradlew.bat --no-daemon --max-workers=1 testgit diff --check통과참고 / 리스크
🔗 Related Issue
💬 공유사항
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.