diff --git a/src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql b/src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql index a3f5866f6188848357676f024d1856858651759d..6a3beee937f221082909af5ee3778e40575240a9 100644 --- a/src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql +++ b/src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql @@ -1,8 +1,8 @@ UPDATE experiment SET algorithms = - ( - SELECT SUBSTR(algorithms, 2, LENGTH(algorithms) - 2) - ); + ( + SELECT SUBSTR(algorithms, 2, LENGTH(algorithms) - 2) + ); UPDATE experiment SET workflowstatus = 'error' @@ -27,20 +27,20 @@ DROP COLUMN validations, DROP COLUMN model_slug; ALTER TABLE experiment - RENAME algorithms TO algorithm; +RENAME algorithms TO algorithm; ALTER TABLE experiment ALTER COLUMN algorithm TYPE json USING algorithm::json; ALTER TABLE experiment - RENAME createdby_username TO created_by_username; +RENAME createdby_username TO created_by_username; ALTER TABLE experiment - RENAME workflowhistoryid TO workflow_history_id; +RENAME workflowhistoryid TO workflow_history_id; ALTER TABLE experiment - RENAME resultsviewed TO viewed; +RENAME resultsviewed TO viewed; ALTER TABLE experiment - RENAME workflowstatus TO status; +RENAME workflowstatus TO status; ALTER TABLE experiment - ADD COLUMN algorithmId text; +ADD COLUMN algorithmId text; UPDATE experiment SET algorithmId = (algorithm ->> 'name');