feat: seed default risk_configs with macro and competitive layers enabled

This commit is contained in:
Celes Renata
2026-04-28 16:34:40 +00:00
parent c188677330
commit 3b22f5e1fc
@@ -0,0 +1,12 @@
-- 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
);