mirror of
https://github.com/open-metadata/OpenMetadata
synced 2026-05-24 09:39:11 +00:00
This is especially needed for instances that had already upgraded to 1.12.0 onwards, those instaces skipped the migration cherry-picked in 1.12.6
19 lines
859 B
SQL
19 lines
859 B
SQL
-- Fix PII classification autoClassificationConfig (issue #27910)
|
|
UPDATE classification
|
|
SET json = JSON_SET(
|
|
json,
|
|
'$.autoClassificationConfig',
|
|
CAST('{"enabled": true, "conflictResolution": "highest_priority", "minimumConfidence": 0.6, "requireExplicitMatch": true}' AS JSON)
|
|
)
|
|
WHERE JSON_VALUE(json, '$.name' RETURNING CHAR) = 'PII'
|
|
AND JSON_EXTRACT(json, '$.autoClassificationConfig.enabled') IS NULL;
|
|
|
|
-- Fix PII tags autoClassificationEnabled (issue #27910)
|
|
UPDATE tag
|
|
SET json = JSON_SET(json, '$.autoClassificationEnabled', CAST('true' AS JSON))
|
|
WHERE JSON_VALUE(json, '$.classification.name' RETURNING CHAR) = 'PII'
|
|
AND JSON_VALUE(json, '$.name' RETURNING CHAR) IN ('NonSensitive', 'Sensitive')
|
|
AND (
|
|
JSON_EXTRACT(json, '$.autoClassificationEnabled') IS NULL
|
|
OR JSON_EXTRACT(json, '$.autoClassificationEnabled') = false
|
|
);
|