TIL

Cannot add or update a child row: a foreign key constraint fails Error

everyday-spring 2024. 8. 29. 20:02

https://github.com/everydayspring/spring-jpa-scheduler

 

GitHub - everydayspring/spring-jpa-scheduler

Contribute to everydayspring/spring-jpa-scheduler development by creating an account on GitHub.

github.com

 

프로젝트 진행중 새로운 Entity 추가 후 발생한 에러

 

새로운 테이블을 생성할 때 참조받는 테이블의 데이터가 이미 삽입되어 있어서 발생한 오류였다

 

전체 테이블을 drop하고 재실행 하니 오류가 나지 않았다