Fix Migrations (#17364)

This commit is contained in:
Mohit Yadav 2024-08-09 20:58:44 +05:30 committed by GitHub
parent 40fc179186
commit 6e80d3f405
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 29 additions and 1 deletions

View File

@ -276,6 +276,20 @@ update thread_entity set json = JSON_REMOVE(json, '$.owner') where json -> '$.ow
update topic_entity set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update type_entity set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update user_entity set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update test_case set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update installed_apps set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update apps_marketplace set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update classification set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update storage_container_entity set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update data_insight_chart set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update doc_store set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update tag set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update test_connection_definition set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update test_definition set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update test_suite set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update topic_entity set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update web_analytic_event set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update automations_workflow set json = JSON_REMOVE(json, '$.owner') where json -> '$.owner' is not null;
update table_entity set json = JSON_SET(
JSON_REMOVE(json, '$.dataModel.owner'),

View File

@ -263,6 +263,20 @@ update thread_entity set json = json#-'{owner}' where json #>> '{owner}' is not
update topic_entity set json = json#-'{owner}' where json #>> '{owner}' is not null;
update type_entity set json = json#-'{owner}' where json #>> '{owner}' is not null;
update user_entity set json = json#-'{owner}' where json #>> '{owner}' is not null;
update test_case set json = json#-'{owner}' where json #>> '{owner}' is not null;
update installed_apps set json = json#-'{owner}' where json #>> '{owner}' is not null;
update apps_marketplace set json = json#-'{owner}' where json #>> '{owner}' is not null;
update classification set json = json#-'{owner}' where json #>> '{owner}' is not null;
update storage_container_entity set json = json#-'{owner}' where json #>> '{owner}' is not null;
update data_insight_chart set json = json#-'{owner}' where json #>> '{owner}' is not null;
update doc_store set json = json#-'{owner}' where json #>> '{owner}' is not null;
update tag set json = json#-'{owner}' where json #>> '{owner}' is not null;
update test_connection_definition set json = json#-'{owner}' where json #>> '{owner}' is not null;
update test_definition set json = json#-'{owner}' where json #>> '{owner}' is not null;
update test_suite set json = json#-'{owner}' where json #>> '{owner}' is not null;
update topic_entity set json = json#-'{owner}' where json #>> '{owner}' is not null;
update web_analytic_event set json = json#-'{owner}' where json #>> '{owner}' is not null;
update automations_workflow set json = json#-'{owner}' where json #>> '{owner}' is not null;
update table_entity set json = jsonb_set(json#-'{dataModel,owner}', '{dataModel,owners}',
jsonb_build_array(json#>'{dataModel,owner}')) where json #>> '{dataModel,owner}' is not null;

View File

@ -67,7 +67,7 @@
"$ref": "#/definitions/testConnectionStep"
}
},
"owner": {
"owners": {
"description": "Owner of this TestConnection definition.",
"$ref": "../../../type/entityReferenceList.json",
"default": null