1.8 KiB
1.8 KiB
BF-1BVCA: combat_turns Column Migration
Status: Migration deployed, blocked by cluster issues
Work Completed
-
Schema Migration Added -
declarative-config/k8s/apexalgo-iad/ai-code-battle/acb-schema-init.yml:- Line 46:
combat_turns INTEGER NOT NULL DEFAULT 0in CREATE TABLE - Line 305:
ALTER TABLE matches ADD COLUMN IF NOT EXISTS combat_turns INTEGER NOT NULL DEFAULT 0;
- Line 46:
-
Rollout Annotation Bumped:
- Updated to
v14-combat-turns-2026-06-03-bf-1bvca-force-restart
- Updated to
-
Changes Committed and Pushed:
- Commit:
1ec0c25- "feat(apexalgo-iad): bump schema-init annotation to v14 - force restart for combat_turns migration"
- Commit:
Current Blockers (Infrastructure, not migration-related)
-
Database Cluster Down:
cnpg-apexalgoincnpgnamespace shows:STATUS: Waiting for the instances to become active INSTANCES: 0/3 readyThe schema-init pod cannot apply migrations without a database connection.
-
CPU Constraints: Index-builder pod pending:
Warning FailedScheduling: 0/3 nodes are available: 3 Insufficient cpu.
Verification Plan
Once cluster is healthy:
- Verify
cnpg-apexalgocluster reachesHealthystatus with 3/3 instances - Schema-init pod should connect and apply migrations (check logs for "Schema applied")
- Index-builder pod should schedule successfully (check
kubectl get pods) - Verify index-builder logs show no "column combat_turns does not exist" errors
Migration Content
-- In CREATE TABLE matches statement
combat_turns INTEGER NOT NULL DEFAULT 0,
-- In migrations section
ALTER TABLE matches ADD COLUMN IF NOT EXISTS combat_turns INTEGER NOT NULL DEFAULT 0;
This migration is idempotent (uses IF NOT EXISTS) and will apply cleanly when the database becomes available.