Skip to content
Snippets Groups Projects

Bug-482/output_error_on_old_experiments

Merged Kostas FILIPPOPOLITIS requested to merge Bug-482/output_error_on_old_experiments into master
2 files
+ 19
7
Compare changes
  • Side-by-side
  • Inline
Files
2
 
UPDATE experiment
 
SET algorithms =
 
(
 
SELECT SUBSTR(algorithms, 2, LENGTH(algorithms) - 2)
 
);
UPDATE experiment
UPDATE experiment
SET workflowstatus = 'error'
SET workflowstatus = 'error'
@@ -21,12 +26,10 @@ DROP COLUMN hasservererror,
@@ -21,12 +26,10 @@ DROP COLUMN hasservererror,
DROP COLUMN validations,
DROP COLUMN validations,
DROP COLUMN model_slug;
DROP COLUMN model_slug;
ALTER TABLE experiment RENAME algorithms TO algorithm;
ALTER TABLE experiment
UPDATE experiment SET algorithm = (algorithm::json ->> 0);
RENAME algorithms TO algorithm;
UPDATE experiment SET algorithmId = (algorithm::json ->> 'name');
ALTER TABLE experiment
ALTER TABLE experiment ADD COLUMN algorithmId text;
ALTER COLUMN algorithm TYPE json USING algorithm::json;
UPDATE experiment SET result = result::json #>>'{0,result}' WHERE (algorithm::json->>'type') <> 'workflow';
ALTER TABLE experiment
ALTER TABLE experiment
RENAME createdby_username TO created_by_username;
RENAME createdby_username TO created_by_username;
ALTER TABLE experiment
ALTER TABLE experiment
@@ -36,6 +39,14 @@ RENAME resultsviewed TO viewed;
@@ -36,6 +39,14 @@ RENAME resultsviewed TO viewed;
ALTER TABLE experiment
ALTER TABLE experiment
RENAME workflowstatus TO status;
RENAME workflowstatus TO status;
 
ALTER TABLE experiment
 
ADD COLUMN algorithmId text;
 
 
UPDATE experiment
 
SET algorithmId = (algorithm ->> 'name');
 
 
ALTER TABLE experiment
 
ALTER COLUMN algorithm TYPE text;
ALTER TABLE experiment
ALTER TABLE experiment
ADD COLUMN updated timestamp without time zone;
ADD COLUMN updated timestamp without time zone;
@@ -70,4 +81,4 @@ DROP TABLE "query";
@@ -70,4 +81,4 @@ DROP TABLE "query";
DROP TABLE "dataset";
DROP TABLE "dataset";
DROP TABLE "config";
DROP TABLE "config";
DROP TABLE "vote", "app";
DROP TABLE "vote", "app";
DROP TABLE "user_roles", "user_languages";
DROP TABLE "user_roles", "user_languages";
 
\ No newline at end of file