Skip to content

Retrospection data model and store #28

Description

@sunba91-su

Goal

Add database tables and store methods for team retrospectives.

Acceptance Criteria

  • New tables added to schema migration:
    • retro_sessions(id TEXT PK, team_id TEXT NOT NULL REFERENCES teams(id), date TEXT NOT NULL, status TEXT NOT NULL DEFAULT "open", created_at TIMESTAMP)
    • retro_columns(session_id TEXT NOT NULL REFERENCES retro_sessions(id), label TEXT NOT NULL, sort_order INT NOT NULL, UNIQUE(session_id, label))
    • retro_items(id TEXT PK, session_id TEXT NOT NULL REFERENCES retro_sessions(id), column_id TEXT NOT NULL, user_id TEXT NOT NULL, username TEXT NOT NULL, content TEXT NOT NULL, created_at TIMESTAMP, UNIQUE(session_id, user_id, column_id))
  • Store methods:
    • CreateRetroSession, GetRetroSession, GetActiveRetroSession, CloseRetroSession
    • AddRetroItem, GetRetroItems (grouped by column), ListRetroSessions
  • Define Go structs: RetroSession, RetroColumn, RetroItem
  • Test methods in store_test.go

Technical Notes

  • Follow patterns from standup_sessions / standup_responses in store
  • Retro columns are flexible (defaults: Went Well, To Improve, Action Items)
  • Items are per-user-per-column

Dependencies

  • None (pure data layer)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions