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

그룹 순서를 변경할 수 있다. #616

Merged
merged 1 commit into from
Jan 6, 2024
Merged

Conversation

Dltmd202
Copy link
Member

@Dltmd202 Dltmd202 commented Jan 6, 2024

PR 요약

그룹 순서를 변경할 수 있다.

변경 사항

  • 그룹 순서를 변경할 수 있다.
  • 기존 데이터베이스 마이그레이션 필요하다.
update user u set u.group_sequence = (select count(*) from user_group ug where ug.user_id = u.id);
update user u set u.group_count = (select count(*) from user_group ug where ug.user_id = u.id);


update user_group ug
    join (
        select ug1.id, count(*) as cnt
            from user_group ug1
                join user_group ug2 on ug1.id >= ug2.id and ug1.user_id = ug2.user_id
            group by ug1.id
        ) subquery on ug.id = subquery.id
set ug.seq = subquery.cnt;

Linked Issue

close #604

@Dltmd202 Dltmd202 added BE BE 관련사항 feature 기능 추가 labels Jan 6, 2024
@Dltmd202 Dltmd202 self-assigned this Jan 6, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (e51c725) 95.73% compared to head (ba9f5fa) 95.71%.
Report is 17 commits behind head on develop.

Files Patch % Lines
BE/src/group/group/entities/group.repository.ts 40.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #616      +/-   ##
===========================================
- Coverage    95.73%   95.71%   -0.02%     
===========================================
  Files          240      242       +2     
  Lines         3515     3571      +56     
  Branches       226      225       -1     
===========================================
+ Hits          3365     3418      +53     
- Misses         144      147       +3     
  Partials         6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Dltmd202 Dltmd202 merged commit aabf63e into develop Jan 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE BE 관련사항 feature 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

그룹 순서를 변경할 수 있다.
2 participants