Skip to content
Snippets Groups Projects
Commit 7e6e4aac authored by kfilippopolitis's avatar kfilippopolitis
Browse files

Revert the change in galaxy algorithm's results format in the migration script.

parent 2dc5ac22
No related branches found
No related tags found
1 merge request!20Bug 482/output error on old experiments
......@@ -23,13 +23,9 @@ DROP COLUMN model_slug;
ALTER TABLE experiment RENAME algorithms TO algorithm;
UPDATE experiment SET algorithm = (algorithm::json ->> 0);
UPDATE experiment SET result = result::json #>>'{0,result}' WHERE (algorithm::json->>'type') <> 'workflow';
UPDATE experiment SET result = (SELECT jsonb_agg(value -> 'result') FROM jsonb_array_elements(result::jsonb)) WHERE (algorithm::json->>'type') = 'workflow';
UPDATE experiment SET result = (SELECT jsonb_agg(d.data) FROM jsonb_array_elements(result::jsonb) t, json_array_elements(t.value::json) d(data)) WHERE (algorithm::json->>'type') = 'workflow';
ALTER TABLE experiment ADD COLUMN algorithmId text;
UPDATE experiment SET algorithmId = (algorithm::json ->> 'name');
ALTER TABLE experiment ADD COLUMN algorithmId text;
UPDATE experiment SET result = result::json #>>'{0,result}' WHERE (algorithm::json->>'type') <> 'workflow';
ALTER TABLE experiment
RENAME createdby_username TO created_by_username;
......
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