OpenMetadata/bootstrap/sql/migrations/native/1.5.0/mysql/postDataMigrationSQLScript.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1.2 KiB
MySQL
Raw Normal View History

-- matchEnum Test Definition Parameter for columnValuesToBeInSet
UPDATE test_definition
set json = JSON_MERGE_PRESERVE(
json,
'{"parameterDefinition": ['
'{"name": "matchEnum", "displayName": "Match enum", "description": "If enabled, validate that each value independently matches the enum.", "dataType": "BOOLEAN", "required": false, "optionValues": []}'
']}'
)
WHERE name = 'columnValuesToBeInSet'
AND JSON_LENGTH(json, '$.parameterDefinition') < 2;
-- Test Case dyanic test migration
UPDATE test_definition
SET json = JSON_SET(json, '$.supportsDynamicAssertion', true)
WHERE name IN (
'columnValueMaxToBeBetween',
'columnValueMeanToBeBetween',
'columnValueMedianToBeBetween',
'columnValueMinToBeBetween',
'columnValueStdDevToBeBetween',
'columnValueLengthsToBeBetween',
'columnValuesSumToBeBetween',
'columnValuesToBeBetween',
'tableRowCountToBeBetween'
);
-- Update schedule type for applications
UPDATE installed_apps
SET json = JSON_MERGE_PATCH(json, '{"scheduleType": "ScheduledOrManual"}')
WHERE JSON_UNQUOTE(json->'$.scheduleType') = 'Scheduled';
-- recreate all scheduled apps
DELETE FROM apps_marketplace
WHERE JSON_UNQUOTE(json->'$.scheduleType') = 'Scheduled';