-- Seed a default risk_configs row with all signal layers explicitly enabled. -- This ensures fresh deployments have macro and competitive layers active -- without requiring manual API calls or DB patches. -- Idempotent: skips if an active config already exists. INSERT INTO risk_configs (name, trading_mode, config, active) SELECT 'default', 'paper', '{"macro_enabled": true, "competitive_enabled": true}'::jsonb, TRUE WHERE NOT EXISTS ( SELECT 1 FROM risk_configs WHERE active = TRUE );