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

[Feat/#85] 구독 취소 API 보정(unsubs_opinion 컬럼 추가) #87

Merged
merged 3 commits into from
Jun 23, 2024

Conversation

hun-ca
Copy link
Member

@hun-ca hun-ca commented Jun 23, 2024

🎫 연관 이슈

resolved #85

💁‍♂️ PR 내용

🙏 작업

🙈 PR 참고 사항

📸 스크린샷

🤖 테스트 체크리스트

  • 체크 미완료
  • 체크 완료

@hun-ca hun-ca added feature 새로운 기능을 만들 때 사용됩니다 infra 인프라를 추가할 때 사용됩니다 labels Jun 23, 2024
@hun-ca hun-ca self-assigned this Jun 23, 2024
@hun-ca hun-ca requested a review from belljun3395 as a code owner June 23, 2024 07:17
Copy link
Member Author

@hun-ca hun-ca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subscription테이블에 unsubs_opinion 컬럼 추가 관련 변경사항입니다

Comment on lines -19 to 18
// 구독중이 아닌지 확인
CountWorkbookSubscriptionQuery(memberId = useCaseIn.memberId, workbookId = useCaseIn.workbookId).let { query ->
subscriptionDao.selectCountWorkbookSubscription(query).let { cnt ->
if (cnt == 0) {
throw RuntimeException("Already subscribed")
}
}
}

subscriptionDao.updateDeletedAtInWorkbookSubscription(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

구독 취소시 구독상태 체크 로직 삭제했어요

@@ -24,6 +24,7 @@ class SubscriptionDao(
fun updateDeletedAtInWorkbookSubscription(command: UpdateDeletedAtInWorkbookSubscriptionCommand) {
dslContext.update(SUBSCRIPTION)
.set(SUBSCRIPTION.DELETED_AT, LocalDateTime.now())
.set(SUBSCRIPTION.UNSUBS_OPINION, command.opinion)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

구독 취소시 SUBSCRIPTION 테이블에 UNSUBS_OPINION 업데이트 하도록 쿼리 수정

Comment on lines +1 to +3
-- subscription 테이블에 reason 컬럼 추가 (한국어로만 100자 가능)
ALTER TABLE subscription
ADD COLUMN unsubs_opinion VARCHAR(300) NULL;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsubs_opinion 컬럼 추가 (flyway)

Copy link
Collaborator

@belljun3395 belljun3395 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다~!

@hun-ca hun-ca merged commit 4833f64 into main Jun 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 새로운 기능을 만들 때 사용됩니다 infra 인프라를 추가할 때 사용됩니다
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[flyway] v1.00.0.1 배포 - reason 컬럼 추가
2 participants