feat: 워크스페이스 유형을 운영 주체 기준 여덟 값으로 확장 - #135
Merged
Merged
Conversation
The kind held three values and only PERSONAL meant anything: TEAM and PROJECT never branched anywhere, so courses were recorded as PROJECT and told apart by reading the workspace name. Six values join them (V125) on one axis, who runs the space rather than what the activity is called. Classification and display only. No permission, quota, period or approval path reads the kind; the round that would make it decide those is the workspace quota model, still in the backlog. TEAM is retired and its rows move to PROJECT, which now means a group building something that none of the other kinds describes (V126). The label survives in the enum because PostgreSQL cannot drop one. An owner may reclassify, audited as workspace.kind_update with the value it replaced. PERSONAL is closed in both directions: automatic creation, undeletability, the closed member list and the withdrawal cleanup all decide by asking whether the kind is PERSONAL. The creatable kinds publish as their own schema rather than a sibling enum beside a $ref, which openapi-typescript drops - that is how the console's generated type came to accept values the server refuses.
Direct inserts would still pass, since the label stays in the enum for the rows that already carry it. Leaving fixtures on a kind nothing can create is what makes the next reader think it still can.
The PATCH field was marked nullable, so the published spec offered a null the service answers with 422 and the hand-written master never allowed. Three sources, two answers. Null is not a value this field can carry: leaving the kind alone is the field being absent, which the presence flag already tracks, and no workspace has a state with no kind. @Schema(nullable = false) does not reach it; the jspecify annotation on the field is what springdoc reads, so that is what comes off. A test now sends an explicit null and expects the 422. The remap migration's comment described one database's rows. It now says why the statement moves every row instead of counting the ones it found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 작업내용
TEAM폐기. 해당 행은PROJECT로, 그보다 먼저 기존PROJECT행은COURSE로 이관 (V126)PATCH /workspaces/{workspaceId}가kind수용, 개인 워크스페이스는 422workspace.kind_update추가, 이전 값 동반 기록CreatableWorkspaceKind별도 스키마로 발행. findings R187 해소⭐️ 검증
clean포함 재실행kind: null422, 감사previousKind기록, 무변경 시 무기록을 실제 서버로 확인CreatableWorkspaceKind존재 확인TEAM치환 95건을 스크립트 보고가 아닌 grep 전수로 검증. 잔존 셋은 폐기 값을 일부러 보내는 자리💬 리뷰 포인트
PROJECT행 전체를COURSE로 옮기는 판단. 어느 행이 실제 수업인지는 환경 지식이라 선택 조건을 넣지 않음errors없이 응답하는 형태