-
Notifications
You must be signed in to change notification settings - Fork 0
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
[FIX] 타임라인 존재 시에도 경기 삭제 가능 #289
Labels
Comments
Zena0128
added a commit
that referenced
this issue
Nov 6, 2024
ALTER TABLE timelines
ADD CONSTRAINT FK_TIMELINES_ON_GAME FOREIGN KEY (game_id) REFERENCES games(id) ON DELETE CASCADE; |
잘 되는 줄 알았는데.... game progress 타임라인만 존재하면 잘 되는데 |
교체, 득점 타임라인도 LineupPlayer와 갖는 fk 때문에 발생하는 오류여서 ALTER TABLE timelines
ADD CONSTRAINT FK_TIMELINES_ON_ORIGIN_LINEUP_PLAYER FOREIGN KEY (origin_lineup_player_id) REFERENCES lineup_players(id) ON DELETE CASCADE;
ALTER TABLE timelines
ADD CONSTRAINT FK_TIMELINES_ON_REPLACED_LINEUP_PLAYER FOREIGN KEY (replaced_lineup_player_id) REFERENCES lineup_players(id) ON DELETE CASCADE;
ALTER TABLE timeliness
ADD CONSTRAINT FK_TIMELINES_ON_SCORER FOREIGN KEY (scorere_id) REFERENCES lineup_players(id) ON DELETE CASCADE; 쿼리 실행하니 서비스 상에서는 잘 되어여 다만 테스트코드에서는 자꾸 제약조건이 걸려 실패하는디... 아직 캐시때문에 제대로 업데이트가 안 된 것인지..? 확인 필요 |
생각해보니 테스트코드는 테스트디비 위에서 돌아가서 그랬겠군여,,, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: