카테고리 없음

Referencing column 'manager _id' and referenced column 'auth_id' in foreign key constraint 'FKk9ovx8ldyjxtp4blkciobskyo' are incompatible.

프로틴형님 2024. 9. 20. 15:29

현재 상황

auth_ID를 UUID로 변경한 후, 기존 DB의 auth_id가 Long으로 지정되어 있어서 에러가 발생

해결 방법

개발 단계이고, DB에 데이터가 없어서 jpa.hibernate.ddl-auto를 create-drop으로 설정한 후 실행했다.
그 후 update로 변경후 API를 테스트했더니 문제없이 작동되었다.

  jpa:
    properties:
      hibernate:
        show_sql: true
        format_sql: true
    hibernate:
      ddl-auto: create-drop