-- Phase 3.3: MarketApp 增加 orchestration(Agent 多 Agent 编排图,JSON) -- 幂等:仅当列不存在时才 ALTER SET @db = 'aiflow'; SET @tbl = 'market_apps'; SET @col = 'orchestration'; SET @exists = ( SELECT COUNT(*) FROM information_schema.columns WHERE table_schema = @db AND table_name = @tbl AND column_name = @col ); SET @sql = IF(@exists = 0, "ALTER TABLE market_apps ADD COLUMN orchestration JSON NULL COMMENT 'Agent 多Agent编排图(3.3)'", 'SELECT 1'); PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;