[BE] refactor: 테스트시 사용하는 h2 DB 가 mysql mode로 실행되도록 수정#518
Open
[BE] refactor: 테스트시 사용하는 h2 DB 가 mysql mode로 실행되도록 수정#518
h2 DB 가 mysql mode로 실행되도록 수정#518Conversation
This comment has been minimized.
This comment has been minimized.
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.
Issues
논의사항
테스트에서 사용하던 h2 DB를 mysql mode 로 바꿨습니다.
truncate 시에 h2 db에서는 sequence 전략을 사용하기 때문에 id가 초기화가 안되는데요. 그래서 truncate 시에
RESTART IDENTITY을 주어 id를 초기화 하는 방법을 사용했습니다.근데 이 방식 외에도 h2DB를 mysql mode로 실행시키면 IDENTITY 전략을 사용해서 truncate시에도 id가 초기화가 됩니다.
저희가 실제 환경에서 mysql을 사용하기 때문에 mysql mode로 해결하는 것이 더 합리적이어서 적용했습니다.
close #517