Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release]: 중복 survey생성을 막는다 #386

Merged
merged 6 commits into from
Mar 6, 2024
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
Loading