增加单一源保护全局策略
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
ALTER TABLE IF EXISTS gateway_runner_policies
|
||||
ADD COLUMN IF NOT EXISTS single_source_policy jsonb NOT NULL DEFAULT '{"enabled":true}'::jsonb;
|
||||
|
||||
UPDATE gateway_runner_policies
|
||||
SET single_source_policy = COALESCE(single_source_policy, '{}'::jsonb) || '{"enabled":true}'::jsonb,
|
||||
metadata = metadata || jsonb_build_object('singleSourcePolicy', '0050_runner_single_source_policy'),
|
||||
updated_at = now()
|
||||
WHERE COALESCE(single_source_policy, '{}'::jsonb) = '{}'::jsonb
|
||||
OR NOT (COALESCE(single_source_policy, '{}'::jsonb) ? 'enabled');
|
||||
Reference in New Issue
Block a user