Skip to content

feat: membersテーブルにstatus列とaffiliation列を追加(Expand)#93

Closed
KinjiKawaguchi wants to merge 4 commits intoworktree-member-aggregate-remodelfrom
feat/member-schema-expand
Closed

feat: membersテーブルにstatus列とaffiliation列を追加(Expand)#93
KinjiKawaguchi wants to merge 4 commits intoworktree-member-aggregate-remodelfrom
feat/member-schema-expand

Conversation

@KinjiKawaguchi
Copy link
Copy Markdown
Member

Why

Member集約リモデリング(#90)のExpand-Contract移行Phase 1。
新しいドメインモデル(ActiveMember/UnconfirmedMember/FormerMember)に必要な列を、既存スキーマを壊さずに追加する。

What

membersテーブルに2列を非破壊的に追加:

説明
status text NOT NULL DEFAULT 'active' メンバーの状態(active/unconfirmed/former)
affiliation jsonb 所属情報(学部・学科 or 研究科・専攻)

既存のdepartment列は維持。後続のContract PRで削除する。

移行全体像

  1. Phase 1: Expand(このPR) — 新列追加
  2. Phase 2: Migrate — 手動で各メンバーのstatus/affiliationを設定
  3. Phase 3: Contract(後続PR) — department列削除、student_id nullable化

Test plan

  • drizzle-kit generateでマイグレーションSQL生成を確認
  • マイグレーション実行後、既存データに影響がないことを確認

🤖 Generated with Claude Code

@KinjiKawaguchi KinjiKawaguchi force-pushed the feat/member-schema-expand branch 2 times, most recently from 36b32bb to 43e0c38 Compare March 22, 2026 10:55
Member集約リモデリングのExpand-Contract移行のPhase 1。
既存のdepartment列は維持したまま、新列を非破壊的に追加する。
- status: member_status enum(active/unconfirmed/former)、デフォルト'active'
- affiliation: 所属情報(JSONB、SerializedAffiliation型で型安全に保存)
- DrizzleMemberRepositoryを新Member型(ActiveMember/UnconfirmedMember/FormerMember)に対応
- SerializedAffiliation型をKarteリポジトリと同じパターンで定義

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@KinjiKawaguchi KinjiKawaguchi force-pushed the feat/member-schema-expand branch 3 times, most recently from 62bf9d0 to cc5ea6c Compare March 22, 2026 11:24
CS/BI/IA → 情報学部の各学科affiliationに自動マッピング。
ALUMNI → status='former'に変更。
GRADUATE/OTHERSは手動対応としてスキップ。
yearはメールアドレスの入学年から自動計算。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@KinjiKawaguchi KinjiKawaguchi force-pushed the feat/member-schema-expand branch from cc5ea6c to 997542e Compare March 22, 2026 11:26
KinjiKawaguchi and others added 2 commits March 22, 2026 20:58
Expand-Contract移行のPhase 3:
- department列を削除(Affiliationに置き換え済み)
- student_idをvarchar(8) nullableに変更(未確認/元室員は持たない)
- timestamp precisionを削除(ミリ秒精度は不要)
- リポジトリのTODOコメントを解消

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Recorded型をshared kernelに追加
- DrizzleMemberRepositoryのpersonalEmailをRecorded<Email>でマッピング
- membersスキーマ: department列削除、student_id varchar(8) nullable化、timestamp precision削除

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant