Skip to content
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

[85-BUG] 사용자 탈퇴 버그 #91

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

cpplovelove
Copy link
Member

작업 목록

  • 사용자 탈퇴 버그 픽스

세부 내용

  • (promise,userId) 쌍이 유니크 키로 지정되어서 알 수 없는 사용자로 초기화될 때, 같은 약속에 탈퇴한 사용자가 둘 이상 포함되어 있으면 키가 중복되는 문제가 있었습니다.
  • Promise_User 테이블 ddl 다음과 같이 변경해서 적용하려 합니다!
    CREATE TABLE 'Promise_User' ( 'promiseUserId' int NOT NULL AUTO_INCREMENT PRIMARY KEY, 'userId' bigint(20) NOT NULL, 'promiseId' int(11) NOT NULL, UNIQUE KEY 'promiseUserId' ('promiseUserId'), CONSTRAINT 'Promise_User_ibfk_1' FOREIGN KEY ('userId') REFERENCES 'User' ('userId') ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT 'Promise_User_ibfk_2' FOREIGN KEY ('promiseId') REFERENCES 'Promise' ('promiseId') ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 |

논의 사항

  • 로컬에서는 테이블 속성 변경해주려고 drop하고 다시 생성했는데 현재 서버에 있는 Promise, Promise_User테이블 초기화해도 괜찮을 지 생각되네요.. ! 당장은 10명 이상 응답 약속 제안 외에 중요한 테스트 데이터는 없는 것 같긴한데 수빈님 생각은 어떠신가요..?

연결된 이슈

- Promise_user 테이블 유니크키 설정 변경
@cpplovelove cpplovelove self-assigned this Aug 1, 2022
@binimini
Copy link
Contributor

binimini commented Aug 2, 2022

흠 웬만하면 테스트 데이터 안날리고 반영하고 싶은데
PK 변경이라서 테이블 드랍했다가 넣는게 필수 인 것 같네요..
PK 설정 후에 다른 API에서의 연관 정상 작동하는지 테스트 하셨죵?
그러면 저희 성과공유회 전에 테이블 변경하는게 나을거같네용
이 PR은 배포 서버에서 테이블 수정 먼저 하고 머지해야할 것 같네요

@binimini
Copy link
Contributor

binimini commented Sep 14, 2022

✔️ 머지 전 진행할 작업

  • 배포 DB에서 테이블 구조 변경 적용 위한 migration 파일 작성
  • 로컬 환경에서 기존 데이터 삭제되지 않는지 테스트
  • 배포 서버에서 migration 적용
  • 머지 후 배포 확인

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants