mirror of
https://github.com/open-metadata/OpenMetadata
synced 2026-05-24 09:39:11 +00:00
The migrations renaming the 'preview' property to 'enabled' in apps were incorrectly placed under 1.11.13. Move them to 1.13.0 where they belong, since this change targets the next major release. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
723 B
SQL
23 lines
723 B
SQL
-- Rename 'preview' to 'enabled' in apps, inverting the boolean value
|
|
-- preview=false (can be used) becomes enabled=true, preview=true becomes enabled=false
|
|
UPDATE apps_marketplace
|
|
SET json = (json - 'preview') || jsonb_build_object(
|
|
'enabled',
|
|
CASE
|
|
WHEN json -> 'preview' = 'null'::jsonb THEN true
|
|
WHEN (json -> 'preview')::boolean = true THEN false
|
|
ELSE true
|
|
END
|
|
)
|
|
WHERE jsonb_exists(json, 'preview');
|
|
|
|
UPDATE installed_apps
|
|
SET json = (json - 'preview') || jsonb_build_object(
|
|
'enabled',
|
|
CASE
|
|
WHEN json -> 'preview' = 'null'::jsonb THEN true
|
|
WHEN (json -> 'preview')::boolean = true THEN false
|
|
ELSE true
|
|
END
|
|
)
|
|
WHERE jsonb_exists(json, 'preview');
|