Skip to content

Commit

Permalink
perf: Survey.targetId에 unique index를 추가한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Mar 6, 2024
1 parent 5232649 commit 7bb89f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create unique index survey_idx_target_id on survey(target_id)
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class SurveyEntity extends TimeBaseEntity {
@OneToMany(mappedBy = "survey", fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
private List<FormQuestionEntity> formQuestionableList;

@JoinColumn(name = "target_id", nullable = false)
@JoinColumn(name = "target_id", nullable = false, unique = true)
private Long targetId;

SurveyEntity(SurveyEntityBuilder<?, ?> surveyEntityBuilder){
Expand Down

0 comments on commit 7bb89f7

Please sign in to comment.