Backend Issue 6: Add Cached Issue Database Model #7

Closed
opened 2026-05-19 02:27:59 -05:00 by null · 0 comments
Owner

Goal

Add a local cache table for Forgejo issues.

Scope

  • Add ForgejoIssue model.
  • Add migration for cached issue fields.
  • Add read schema for cached issue records.
  • Do not add sync logic in this issue.

Suggested Model Shape

id, organization_id, repository_id, forgejo_issue_number,
title, body_preview, state, is_pull_request, labels,
assignees, author, html_url, forgejo_created_at,
forgejo_updated_at, forgejo_closed_at, last_synced_at,
created_at, updated_at

Acceptance Criteria

  • Migration creates forgejo_issues.
  • Unique constraint prevents duplicate issue numbers per tracked repository.
  • JSON fields use existing SQLModel JSON column patterns.
  • Read schema excludes secrets and includes enough display fields for frontend tables.
  • Tests cover model construction and uniqueness behavior.

Out Of Scope

  • Forgejo HTTP calls, sync endpoint, Frontend UI.
## Goal Add a local cache table for Forgejo issues. ## Scope - Add `ForgejoIssue` model. - Add migration for cached issue fields. - Add read schema for cached issue records. - Do not add sync logic in this issue. ## Suggested Model Shape ``` id, organization_id, repository_id, forgejo_issue_number, title, body_preview, state, is_pull_request, labels, assignees, author, html_url, forgejo_created_at, forgejo_updated_at, forgejo_closed_at, last_synced_at, created_at, updated_at ``` ## Acceptance Criteria - Migration creates `forgejo_issues`. - Unique constraint prevents duplicate issue numbers per tracked repository. - JSON fields use existing SQLModel JSON column patterns. - Read schema excludes secrets and includes enough display fields for frontend tables. - Tests cover model construction and uniqueness behavior. ## Out Of Scope - Forgejo HTTP calls, sync endpoint, Frontend UI.
null closed this issue 2026-05-19 03:17:08 -05:00
null added the
backend
forgejo
service
sync
labels 2026-05-19 03:32:00 -05:00
Sign in to join this conversation.
No description provided.