From 56a402e9bc4d866954e8e2bd20300fd750016cbf Mon Sep 17 00:00:00 2001
From: kfilippopolitis <kostasfilippop@gmail.com>
Date: Fri, 11 Jun 2021 03:20:12 -0700
Subject: [PATCH] Small fix in migration script

---
 src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql b/src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql
index 6f0380aee..81b7fbcc6 100644
--- a/src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql
+++ b/src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql
@@ -23,8 +23,8 @@ DROP COLUMN model_slug;
 
 ALTER TABLE experiment RENAME algorithms TO algorithm;
 UPDATE experiment SET algorithm = (algorithm::json ->> 0);
-UPDATE experiment SET algorithmId = (algorithm::json ->> 'name');
 ALTER TABLE experiment ADD COLUMN algorithmId text;
+UPDATE experiment SET algorithmId = (algorithm::json ->> 'name');
 UPDATE experiment SET result = result::json #>>'{0,result}' WHERE (algorithm::json->>'type') <> 'workflow';
 
 ALTER TABLE experiment
-- 
GitLab