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

Shared Status 이동 #639

Merged
merged 4 commits into from
Sep 27, 2023
Merged

Shared Status 이동 #639

merged 4 commits into from
Sep 27, 2023

Conversation

LJW25
Copy link
Collaborator

@LJW25 LJW25 commented Sep 27, 2023

📄 Summary

#638

Shared Status를 SharedTrip에서 Trip으로 이동하였습니다. with 홍고

🙋🏻 More

일단 사이드이펙트를 최소화할수 있는 방향으로 구현했기 때문에, 후에 대대적인 리팩토링이 필요해보입니다. 이슈로 남겨두겠습니다.
테스트는 다 통과했는데 나 무서워... 제발 확인해줘...
Fixture 네이밍 감도안잡혀서 일단 의식의 흐름대로 넣었는데 반박 환영.

@github-actions
Copy link

github-actions bot commented Sep 27, 2023

📝 Jacoco Test Coverage

Total Project Coverage 81.17% 🍏
File Coverage [95.7%]
SharedTripCodeResponse.java 100% 🍏
Trip.java 98.22% 🍏
SharedTripService.java 95.58% 🍏
SharedTrip.java 90% 🍏

Copy link
Member

@jjongwa jjongwa left a comment

Choose a reason for hiding this comment

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

FIxture 네이밍 쯤이야..

Comment on lines 147 to 155
if (this.sharedStatus.equals(SharedStatusType.SHARED)) {
return Optional.empty();
}
return Optional.of(sharedTrip.getSharedCode());
}

public Boolean isShared() {
return this.sharedStatus.equals(SharedStatusType.SHARED);
}
Copy link
Member

Choose a reason for hiding this comment

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

아래에 만든 isShared()를 if문에 넣어도 될 듯 합니다.!

Copy link
Collaborator Author

@LJW25 LJW25 Sep 27, 2023

Choose a reason for hiding this comment

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

사실 넣었었는데 소나린트가 저렇게 하라고 추천해주더라구요? 깔끔하게 isShared 갈까요?!

Copy link
Collaborator

Choose a reason for hiding this comment

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

UNSHARED 아닌가용 ????

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

진짜 충격적 삼보일배하고 가겠습니다 라온

Comment on lines +1 to +10
ALTER TABLE trip ADD COLUMN shared_status ENUM ('SHARED','UNSHARED');
UPDATE trip SET shared_status = 'UNSHARED';
ALTER TABLE trip MODIFY COLUMN shared_status ENUM ('SHARED','UNSHARED') NOT NULL;

CREATE TABLE copy_shared_trip AS SELECT * FROM shared_trip;

UPDATE trip INNER JOIN shared_trip ON trip.id = shared_trip.trip_id
SET trip.shared_status = shared_trip.shared_status;

ALTER TABLE shared_trip DROP COLUMN shared_status;
Copy link
Member

Choose a reason for hiding this comment

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

ㄷㄷ

Copy link
Collaborator

@mcodnjs mcodnjs left a comment

Choose a reason for hiding this comment

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

👍👍👍

@LJW25 LJW25 merged commit 89ae2f5 into develop Sep 27, 2023
1 check passed
jjongwa pushed a commit that referenced this pull request Oct 8, 2023
* chore: shared_status 이동 쿼리 작성

Co-authored-by: hgo641 <hgo641@gmail.com>

* refactor: shared_status 이동에 따른 프로덕션 코드 수정

* refactor: boolean primitive 타입으로 변경

* fix: if 조건 수정

---------

Co-authored-by: hgo641 <hgo641@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants