Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
portal-backend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HBP Medical Informatics Platform
portal-backend
Commits
7e6e4aac
Commit
7e6e4aac
authored
3 years ago
by
kfilippopolitis
Browse files
Options
Downloads
Patches
Plain Diff
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
!20
Bug 482/output error on old experiments
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql
+2
-6
2 additions, 6 deletions
...ain/resources/db/migration/V7_0__NewDatabaseStructure.sql
with
2 additions
and
6 deletions
src/main/resources/db/migration/V7_0__NewDatabaseStructure.sql
+
2
−
6
View file @
7e6e4aac
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment