fix(ui): default settings values for existing users

This commit is contained in:
Shekar Siri 2025-01-28 12:51:16 +01:00
parent defcc65848
commit 3038fe58d0
2 changed files with 18 additions and 0 deletions

View file

@ -93,6 +93,15 @@ DROP TYPE IF EXISTS events.resource_method;
ALTER TYPE integration_provider ADD VALUE IF NOT EXISTS 'dynatrace';
UPDATE users SET settings=COALESCE(settings, '{}'::jsonb) || '{
"modules": [
"usability-tests",
"feature-flags"
]
}'::jsonb
WHERE settings IS NULL
OR settings -> 'modules' IS NULL;
COMMIT;
\elif :is_next

View file

@ -88,6 +88,15 @@ DROP TYPE IF EXISTS events.resource_method;
ALTER TYPE integration_provider ADD VALUE IF NOT EXISTS 'dynatrace';
UPDATE users SET settings=COALESCE(settings, '{}'::jsonb) || '{
"modules": [
"usability-tests",
"feature-flags"
]
}'::jsonb
WHERE settings IS NULL
OR settings -> 'modules' IS NULL;
COMMIT;
\elif :is_next