You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- Update tdViewDisplayPlanes user configuration setting based on its previous value
-- A previous tdViewDisplayPlanes value of true corresponds to the "DATA" enum value
-- and a value of false corresponds to the "WIREFRAME" enum value
-- For the user configuration
UPDATEwebknossos.users
SET userconfiguration = CASE
WHEN jsonb_typeof(userconfiguration->'tdViewDisplayPlanes') ='boolean'AND (userconfiguration->>'tdViewDisplayPlanes')::boolean IS TRUE THEN jsonb_set(
userconfiguration,
array['tdViewDisplayPlanes'],
to_jsonb('DATA'::text))
ELSE jsonb_set(
userconfiguration,
array['tdViewDisplayPlanes'],
to_jsonb('WIREFRAME'::text))
END
WHERE userconfiguration ? 'tdViewDisplayPlanes';
-- For the recommended configuration in task types
UPDATEwebknossos.tasktypes
SET recommendedconfiguration = CASE
WHEN jsonb_typeof(recommendedconfiguration->'tdViewDisplayPlanes') ='boolean'AND (recommendedconfiguration->>'tdViewDisplayPlanes')::boolean IS TRUE THEN jsonb_set(
recommendedconfiguration,
array['tdViewDisplayPlanes'],
to_jsonb('DATA'::text))
ELSE jsonb_set(
recommendedconfiguration,
array['tdViewDisplayPlanes'],
to_jsonb('WIREFRAME'::text))
END
WHERE recommendedconfiguration ? 'tdViewDisplayPlanes';
-- Remove unused configuration key of user configuration
UPDATEwebknossos.users
SET userconfiguration = userconfiguration -'configuration'