fix: Add missing deployment_status and deployment_message columns to teams table
## Problem WHOOSH was failing to update team deployment status with database errors: - ERROR: column 'deployment_status' of relation 'teams' does not exist (SQLSTATE 42703) - This prevented proper tracking of agent deployment progress ## Solution - **Added migration 007**: Creates deployment_status and deployment_message columns - **deployment_status VARCHAR(50)**: Tracks deployment state (pending/success/failed) - **deployment_message TEXT**: Stores deployment error messages or status details - **Added index**: For efficient deployment status queries - **Backward compatibility**: Sets default values for existing teams ## Impact - ✅ Fixes team deployment status tracking errors - ✅ Enables proper agent deployment monitoring - ✅ Maintains data consistency with existing teams - ✅ Improves query performance with new index This resolves the database errors that were preventing WHOOSH from tracking autonomous team deployment status. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
7
migrations/007_add_team_deployment_status.down.sql
Normal file
7
migrations/007_add_team_deployment_status.down.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Remove deployment status tracking from teams table
|
||||
|
||||
DROP INDEX IF EXISTS idx_teams_deployment_status;
|
||||
|
||||
ALTER TABLE teams
|
||||
DROP COLUMN IF EXISTS deployment_status,
|
||||
DROP COLUMN IF EXISTS deployment_message;
|
||||
12
migrations/007_add_team_deployment_status.up.sql
Normal file
12
migrations/007_add_team_deployment_status.up.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Add deployment status tracking to teams table
|
||||
-- These columns are needed for agent deployment status tracking
|
||||
|
||||
ALTER TABLE teams
|
||||
ADD COLUMN deployment_status VARCHAR(50) DEFAULT 'pending',
|
||||
ADD COLUMN deployment_message TEXT DEFAULT '';
|
||||
|
||||
-- Add index for deployment status queries
|
||||
CREATE INDEX IF NOT EXISTS idx_teams_deployment_status ON teams(deployment_status);
|
||||
|
||||
-- Update existing teams to have proper deployment status
|
||||
UPDATE teams SET deployment_status = 'pending' WHERE deployment_status IS NULL;
|
||||
Reference in New Issue
Block a user