Skip to content

Commit 532c99e

Browse files
committed
[Feat]: 투표 참여 엔티티 userHash 필드 제거 및 유니크 제약조건 삭제
1 parent 68a7798 commit 532c99e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

back/src/main/java/com/back/domain/poll/entity/PollVote.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
@Entity
2121
@Table(name = "poll_votes",
2222
uniqueConstraints = {
23-
@UniqueConstraint(name = "uq_logged_in_once", columnNames = {"post_id", "pollUid", "user_id"}),
24-
@UniqueConstraint(name = "uq_anonymous_once", columnNames = {"post_id", "pollUid", "userHash"})
23+
@UniqueConstraint(name = "uq_logged_in_once", columnNames = {"post_id", "pollUid", "user_id"})
2524
}
2625
)
2726
@Getter
@@ -41,9 +40,6 @@ public class PollVote extends BaseEntity {
4140
@JoinColumn(name = "user_id")
4241
private User user;
4342

44-
@Column(length = 128)
45-
private String userHash;
46-
4743
@JdbcTypeCode(SqlTypes.JSON)
4844
@Column(nullable = false, columnDefinition = "jsonb")
4945
private String choiceJson;

0 commit comments

Comments
 (0)