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

[BE] 초기 데이터 설정시 중복 삽입 방지, 선택지 최대 갯수 적용 #314

Closed
skylar1220 opened this issue Aug 12, 2024 · 4 comments · Fixed by #405
Closed

Comments

@skylar1220
Copy link
Contributor

skylar1220 commented Aug 12, 2024

🔍 설명

  • 초기 데이터 설정시 중복 삽입 방지, 선택지 최대 갯수 적용

🔥 할 일

  • 초기 데이터 설정시 서버가 켜질 때마다 초기 데이터가 삽입됩니다. 기존 데이터가 있으면 삽입하지 않는 로직을 추가해야합니다.
  • 꼬리질문 객관식 최대 선택 갯수를 3개로 수정합니다.
  • 꼬리질문 서술형 질문 내용을 수정합니다. : 위에서 선택한 사항과 관련된 경험을 구체적으로 적어 주세요.

⏰ 예상 시간

  • 1시간?

🐴 할 말

@donghoony
Copy link
Contributor

현재 상황: MySQL 직접 들어가서 업데이트 날리는 중. 존재하지 않으면 한 번만 추가하는 기능이 필요할 듯.

@donghoony
Copy link
Contributor

위에서 선택한 사항과 관련된 경험을 구체적으로 적어 주세요.

@donghoony
Copy link
Contributor

최대 3개 고정

@skylar1220
Copy link
Contributor Author

skylar1220 commented Aug 16, 2024

  1. prod
    현재는 임시방편이므로 추후
  • sql root에서 데이터 추가하거나(다른 user의 수정 권한 없애기)
  • admin 페이지를 만들어서 추가하게 하거나(u,d api 필요)
  1. dev: 이미 템플릿이 있으면 추가하지 않는 로직을 DataInitializer에 추가
// 템플릿이 이미 존재하면 종료
if (templateRepository.existsById(1L)) {
    return;
}

@skylar1220 skylar1220 changed the title [BE] 초기 데이터 설정시 선택지 최대 갯수 수정 [BE] 초기 데이터 설정시 중복 삽입 방지, 선택지 최대 갯수 적용 Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment