SysOps: deploy-all — 2026-06-09 10:59 UTC
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
-- Dashboard widget visibility + KPI selection
|
||||
ALTER TABLE user_ui_preferences ADD COLUMN IF NOT EXISTS dashboard_widgets JSONB DEFAULT '{}'::jsonb;
|
||||
ALTER TABLE user_ui_preferences ADD COLUMN IF NOT EXISTS dashboard_kpis JSONB DEFAULT '[]'::jsonb;
|
||||
|
||||
-- Ensure RSS widget in default layout for existing users
|
||||
UPDATE user_ui_preferences
|
||||
SET dashboard_layout = (
|
||||
SELECT jsonb_agg(elem)
|
||||
FROM (
|
||||
SELECT DISTINCT elem
|
||||
FROM jsonb_array_elements_text(
|
||||
COALESCE(dashboard_layout, '[]'::jsonb) || '["rss"]'::jsonb
|
||||
) AS elem
|
||||
) s
|
||||
)
|
||||
WHERE dashboard_layout IS NOT NULL
|
||||
AND NOT dashboard_layout @> '["rss"]'::jsonb;
|
||||
Reference in New Issue
Block a user