fix: Fix partition constraint errors in PostgreSQL and MySQL schemas#1
Closed
shinnyeonki wants to merge 1 commit intocivilian7:mainfrom
Closed
fix: Fix partition constraint errors in PostgreSQL and MySQL schemas#1shinnyeonki wants to merge 1 commit intocivilian7:mainfrom
shinnyeonki wants to merge 1 commit intocivilian7:mainfrom
Conversation
Owner
|
감사합니다! 동일한 수정을 36d8d67 커밋에 직접 반영했습니다.
파티션 테이블 제약조건 문제를 정확히 짚어주셔서 감사합니다. README 기여자 섹션에도 등록했습니다. |
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.
문제 발생
postgresql 및 MySQL 환경에서 파티셔닝된 orders 테이블에 데이터를 주입하거나 스키마를 생성할 때 다음과 같은 에러가 발생합니다.
PostgreSQL: unique constraint on partitioned table must include all partitioning columns
MySQL: A UNIQUE INDEX must include all columns in the table's partitioning function
파티셔닝시 고유 제약 조건(PRIMARY KEY, UNIQUE KEY)에 파티션 키(본 프로젝트에서는 ordered_at)가 포함될 것을 강제하므로
컬럼 레벨의 UNIQUE 제약을 제거하고 테이블 레벨 복합 유니크 제약 추가하였습니다