Skip to content
Snippets Groups Projects
Unverified Commit c20d7816 authored by K.Filippopolitis's avatar K.Filippopolitis Committed by GitHub
Browse files

Update V7_1__NewExperimentResultFormat.sql

Cherry pick updated migration script 7.1
parent 6d453d78
No related branches found
No related tags found
1 merge request!26Update V7_1__NewExperimentResultFormat.sql
UPDATE experiment SET result = result::json #>>'{0,result}' WHERE (algorithm::json->>'type') <> 'workflow';
\ No newline at end of file
CREATE OR REPLACE FUNCTION ISJSON(p_json text)
RETURNS boolean
AS
$$
BEGIN
RETURN (p_json::json is not null);
EXCEPTION
WHEN others THEN
RETURN false;
END;
$$
language plpgsql
immutable;
UPDATE experiment SET result = result::json #>>'{0,result}' WHERE (algorithm::json->>'type') <> 'workflow' and ISJSON(result);
UPDATE experiment SET result = '', status = 'error' WHERE NOT ISJSON(result);
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment