mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-23 16:38:17 +00:00
Minor fix psql dq migration failures (#17985)
* fix import issue * fix: psql null testCaseResult migration failure --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
This commit is contained in:
parent
65babfd586
commit
a6c2ec747a
@ -24,7 +24,10 @@ CREATE INDEX data_quality_data_time_series_id_index ON data_quality_data_time_se
|
||||
-- Remove VIRTUAL status column from test_case table and remove
|
||||
-- testCaseResult state from testCase; fetch from search repo.
|
||||
ALTER TABLE test_case DROP COLUMN status;
|
||||
UPDATE test_case SET json = JSON_SET(json, '$.testCaseStatus', JSON_EXTRACT(json, '$.testCaseResult.testCaseStatus'));
|
||||
|
||||
UPDATE test_case SET json = JSON_SET(json, '$.testCaseStatus', JSON_EXTRACT(json, '$.testCaseResult.testCaseStatus'))
|
||||
WHERE JSON_EXTRACT(json, '$.testCaseResult.testCaseStatus') IS NOT NULL;
|
||||
|
||||
ALTER TABLE test_case ADD COLUMN status VARCHAR(56) GENERATED ALWAYS AS (JSON_UNQUOTE(JSON_EXTRACT(json, '$.testCaseStatus'))) STORED;
|
||||
|
||||
|
||||
|
@ -28,7 +28,10 @@ CREATE INDEX IF NOT EXISTS data_quality_data_time_series_id_index ON data_qual
|
||||
-- Remove VIRTUAL status column from test_case table and remove
|
||||
-- testCaseResult state from testCase; fetch from search repo.
|
||||
ALTER TABLE test_case DROP COLUMN status;
|
||||
UPDATE test_case SET json = jsonb_set(json, '{testCaseStatus}', json->'testCaseResult'->'testCaseStatus');
|
||||
|
||||
UPDATE test_case SET json = jsonb_set(json, '{testCaseStatus}', json->'testCaseResult'->'testCaseStatus')
|
||||
WHERE json->'testCaseResult'->'testCaseStatus' IS NOT NULL;
|
||||
|
||||
ALTER TABLE test_case ADD COLUMN status VARCHAR(56) GENERATED ALWAYS AS (json ->> 'testCaseStatus') STORED NULL;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user