diff --git a/src/main/java/com/gdschongik/gdsc/domain/study/domain/AssignmentHistory.java b/src/main/java/com/gdschongik/gdsc/domain/study/domain/AssignmentHistory.java index ca6c93fd0..a7384e53c 100644 --- a/src/main/java/com/gdschongik/gdsc/domain/study/domain/AssignmentHistory.java +++ b/src/main/java/com/gdschongik/gdsc/domain/study/domain/AssignmentHistory.java @@ -17,6 +17,8 @@ import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; import java.time.LocalDateTime; import lombok.AccessLevel; import lombok.Builder; @@ -26,6 +28,7 @@ @Getter @Entity @NoArgsConstructor(access = AccessLevel.PROTECTED) +@Table(uniqueConstraints = {@UniqueConstraint(columnNames = {"study_detail_id", "member_id"})}) public class AssignmentHistory extends BaseEntity { @Id