feat: seed default risk_configs with macro and competitive layers enabled
This commit is contained in:
@@ -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
|
||||
);
|
||||
Reference in New Issue
Block a user