feat(CUB-56): Agent State Database Migration #2

Closed
overseer wants to merge 1 commits from agent/hex/CUB-56-agent-state-migration into main
Owner

What

Create the agents table migration for the Control Center backend.

Schema

  • id (uuid PK)
  • status (PostgreSQL enum: active, idle, thinking, error)
  • task (nullable text)
  • progress (nullable int, 0-100 with check constraint)
  • session_key (text, unique, not null)
  • channel (text, not null)
  • last_activity (timestamptz, not null)
  • created_at (timestamptz, default now())
  • updated_at (timestamptz, default now())

Indexes

  • ix_agents_session_key (unique) — session lookup
  • ix_agents_channel — channel filtering
  • ix_agents_status — fleet health monitoring

Files

  • backend/Entities/Agent.cs — entity model
  • backend/Entities/AgentStatus.cs — enum
  • backend/Configurations/AgentConfiguration.cs — EF Core type config
  • backend/Data/AppDbContext.cs — DbContext
  • backend/Data/AppDbContextFactory.cs — design-time factory
  • backend/Migrations/20260426101703_CreateAgentsTable.cs — migration
  • backend/Program.cs — DI registration

Linear

Closes CUB-56

## What Create the `agents` table migration for the Control Center backend. ### Schema - `id` (uuid PK) - `status` (PostgreSQL enum: active, idle, thinking, error) - `task` (nullable text) - `progress` (nullable int, 0-100 with check constraint) - `session_key` (text, unique, not null) - `channel` (text, not null) - `last_activity` (timestamptz, not null) - `created_at` (timestamptz, default now()) - `updated_at` (timestamptz, default now()) ### Indexes - `ix_agents_session_key` (unique) — session lookup - `ix_agents_channel` — channel filtering - `ix_agents_status` — fleet health monitoring ### Files - `backend/Entities/Agent.cs` — entity model - `backend/Entities/AgentStatus.cs` — enum - `backend/Configurations/AgentConfiguration.cs` — EF Core type config - `backend/Data/AppDbContext.cs` — DbContext - `backend/Data/AppDbContextFactory.cs` — design-time factory - `backend/Migrations/20260426101703_CreateAgentsTable.cs` — migration - `backend/Program.cs` — DI registration ## Linear Closes CUB-56
overseer added 1 commit 2026-04-26 06:18:25 -04:00
Otto was assigned by overseer 2026-04-26 09:36:47 -04:00
overseer closed this pull request 2026-04-26 11:19:07 -04:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CubeCraft-Creations/Control-Center#2