mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 17:04:54 +00:00
fix: move migration to 1.3.1 (#15463)
This commit is contained in:
parent
70e1643bd8
commit
6536ce7c94
@ -0,0 +1,13 @@
|
||||
-- Update the relation between testDefinition and testCase to 0 (CONTAINS)
|
||||
UPDATE entity_relationship
|
||||
SET relation = 0
|
||||
WHERE fromEntity = 'testDefinition' AND toEntity = 'testCase' AND relation != 0;
|
||||
|
||||
-- Update the test definition provider
|
||||
-- If the test definition has OpenMetadata as a test platform, then the provider is system, else it is user
|
||||
UPDATE test_definition
|
||||
SET json = CASE
|
||||
WHEN JSON_CONTAINS(json, '"OpenMetadata"', '$.testPlatforms') THEN JSON_INSERT(json,'$.provider','system')
|
||||
ELSE JSON_INSERT(json,'$.provider','user')
|
||||
END
|
||||
;
|
@ -0,0 +1,13 @@
|
||||
-- Update the relation between testDefinition and testCase to 0 (CONTAINS)
|
||||
UPDATE entity_relationship
|
||||
SET relation = 0
|
||||
WHERE fromEntity = 'testDefinition' AND toEntity = 'testCase' AND relation != 0;
|
||||
|
||||
-- Update the test definition provider
|
||||
-- If the test definition has OpenMetadata as a test platform, then the provider is system, else it is user
|
||||
UPDATE test_definition
|
||||
SET json =
|
||||
case
|
||||
when json->'testPlatforms' @> '"OpenMetadata"' then jsonb_set(json,'{provider}','"system"',true)
|
||||
else jsonb_set(json,'{provider}','"user"', true)
|
||||
end;
|
@ -1,13 +0,0 @@
|
||||
-- Update the relation between testDefinition and testCase to 0 (CONTAINS)
|
||||
UPDATE entity_relationship
|
||||
SET relation = 0
|
||||
WHERE fromEntity = 'testDefinition' AND toEntity = 'testCase' AND relation != 0;
|
||||
|
||||
-- Update the test definition provider
|
||||
-- If the test definition has OpenMetadata as a test platform, then the provider is system, else it is user
|
||||
UPDATE test_definition
|
||||
SET json = CASE
|
||||
WHEN JSON_CONTAINS(json, '"OpenMetadata"', '$.testPlatforms') THEN JSON_INSERT(json,'$.provider','system')
|
||||
ELSE JSON_INSERT(json,'$.provider','user')
|
||||
END
|
||||
;
|
@ -1,13 +0,0 @@
|
||||
-- Update the relation between testDefinition and testCase to 0 (CONTAINS)
|
||||
UPDATE entity_relationship
|
||||
SET relation = 0
|
||||
WHERE fromEntity = 'testDefinition' AND toEntity = 'testCase' AND relation != 0;
|
||||
|
||||
-- Update the test definition provider
|
||||
-- If the test definition has OpenMetadata as a test platform, then the provider is system, else it is user
|
||||
UPDATE test_definition
|
||||
SET json =
|
||||
case
|
||||
when json->'testPlatforms' @> '"OpenMetadata"' then jsonb_set(json,'{provider}','"system"',true)
|
||||
else jsonb_set(json,'{provider}','"user"', true)
|
||||
end;
|
Loading…
x
Reference in New Issue
Block a user