From dd4ef0f5e3c290ee84a772dd4ce1f954b3313bde Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 24 Sep 2025 15:59:21 +1000 Subject: [PATCH] fix: Add missing deployment_status and deployment_message columns to teams table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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 --- migrations/007_add_team_deployment_status.down.sql | 7 +++++++ migrations/007_add_team_deployment_status.up.sql | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 migrations/007_add_team_deployment_status.down.sql create mode 100644 migrations/007_add_team_deployment_status.up.sql diff --git a/migrations/007_add_team_deployment_status.down.sql b/migrations/007_add_team_deployment_status.down.sql new file mode 100644 index 0000000..3380dcf --- /dev/null +++ b/migrations/007_add_team_deployment_status.down.sql @@ -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; \ No newline at end of file diff --git a/migrations/007_add_team_deployment_status.up.sql b/migrations/007_add_team_deployment_status.up.sql new file mode 100644 index 0000000..77f2733 --- /dev/null +++ b/migrations/007_add_team_deployment_status.up.sql @@ -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; \ No newline at end of file