From d6f4130ff64b804a1bd4cea61c513a4c0cb7c433 Mon Sep 17 00:00:00 2001 From: Sascha Szott Date: Wed, 14 Feb 2024 18:43:07 +0100 Subject: [PATCH] fix bug in PR affiliations migration --- dspace/etc/migration/entity_migration.ktr | 795 +++++++++------------- 1 file changed, 313 insertions(+), 482 deletions(-) diff --git a/dspace/etc/migration/entity_migration.ktr b/dspace/etc/migration/entity_migration.ktr index 60cbc816068a..f638d33f6b87 100644 --- a/dspace/etc/migration/entity_migration.ktr +++ b/dspace/etc/migration/entity_migration.ktr @@ -792,16 +792,6 @@ Append Nested Y - - Select values 4 - Join rows 5 - Y - - - Join rows 4 - Select values 4 - Y - Select values Join rows 5 @@ -817,11 +807,6 @@ Join rows 6 Y - - Join rows 6 - Select values 7 - Y - Select values 7 Append streams @@ -1057,6 +1042,21 @@ is eperson Y + + Join rows 4 + Join rows 5 + Y + + + Join rows 6 + Add constants 2 + Y + + + Add constants 2 + Select values 7 + Y + Add constants @@ -1301,6 +1301,57 @@ Y + + Add constants 2 + Constant + + Y + + 1 + + none + + + + + nested_object_id + Integer + + + + + + -1 + -1 + N + + + positiondef + Integer + + + + + + -1 + -1 + N + + + + + + + + + + + + 480 + 688 + Y + + Add imp_bitstream_id Sequence @@ -1546,6 +1597,33 @@ Y + + Append eperson metadata + Append + + Y + + 1 + + none + + + Append legacy ids + select metadata attributes 2 2 + + + + + + + + + + 1120 + 1536 + Y + + Append legacy ids Append @@ -2165,6 +2243,44 @@ WHERE rpage.crisid = ? AND ep.eperson_id = rpage.epersonid; Y + + Get eperson 2 + DBJoin + + Y + + 1 + + none + + + dspace + 1 + SELECT ep.uuid as metadata_authority, ep.email as metadata_value +FROM eperson ep +WHERE ep.eperson_id = ? + N + Y + + + custompointer + Integer + + + + + + + + + + + + 912 + 1792 + Y + + Get orcid auth token DBJoin @@ -3011,40 +3127,6 @@ WHERE property_def.id = properties.typo_id Y - - Select values 4 - SelectValues - - Y - - 1 - - none - - - - N - - nested_object_id - - - positiondef - - - - - - - - - - - - 352 - 880 - Y - - Select values 5 SelectValues @@ -3287,6 +3369,12 @@ WHERE property_def.id = properties.typo_id value + + nested_object_id + + + positiondef + Y @@ -3414,6 +3502,12 @@ WHERE property_def.id = properties.typo_id value + + nested_object_id + + + positiondef + Y @@ -3531,6 +3625,22 @@ WHERE property_def.id = properties.typo_id 0 N + + nested_object_id + Y + N + N + 0 + N + + + positiondef + Y + N + N + 0 + N + @@ -5875,6 +5985,53 @@ ORDER BY parent_id ASC; Y + + eperson values not null + FilterRows + + Y + + 1 + + none + + + select metadata attributes 2 2 + + + + N + + + N + metadata_value + IS NOT NULL + + + + N + AND + metadata_authority + IS NOT NULL + + + + + + + + + + + + + + + 1120 + 1776 + Y + + filter by entity type FilterRows @@ -6557,7 +6714,7 @@ ORDER BY parent_id ASC; - is file + is eperson FilterRows Y @@ -6567,13 +6724,57 @@ ORDER BY parent_id ASC; none - Get ENTITY_TYPE from variables 4 - is eperson + Get eperson 2 + N - - + dtype + = + + + constant + String + eperson + -1 + -1 + N + + + + + + + + + + + + + + 160 + 1792 + Y + + + + is file + FilterRows + + Y + + 1 + + none + + + Get ENTITY_TYPE from variables 4 + is eperson + + + N + + N dtype = @@ -7511,6 +7712,64 @@ ORDER BY parent_id ASC; Y + + select metadata attributes 2 2 + SelectValues + + N + + 1 + + none + + + + + schema + + + element + + + qualifier + + + imp_record_id + + + metadata_value + + + metadata_order + + + crisid + + + metadata_authority + + + metadata_visibility + + + language + + N + + + + + + + + + + + 1120 + 1648 + Y + + select metadata attributes 3 SelectValues @@ -7814,434 +8073,6 @@ ORDER BY parent_id ASC; 1840 Y - - - Get eperson 2 - DBJoin - - Y - - 1 - - none - - - dspace - 1 - SELECT ep.uuid as metadata_authority, ep.email as metadata_value -FROM eperson ep -WHERE ep.eperson_id = ? - N - Y - - - custompointer - Integer - - - - - - - - - - - - 912 - 1792 - Y - - - - eperson values not null - FilterRows - - Y - - 1 - - none - - - select metadata attributes 2 2 - - - - N - - - N - metadata_value - IS NOT NULL - - - - N - AND - metadata_authority - IS NOT NULL - - - - - - - - - - - - - - - 1120 - 1776 - Y - - - - is eperson - FilterRows - - Y - - 1 - - none - - - Get eperson 2 - - - - N - dtype - = - - - constant - String - eperson - -1 - -1 - N - - - - - - - - - - - - - - 160 - 1792 - Y - - - - select metadata attributes 2 2 - SelectValues - - N - - 1 - - none - - - - - schema - - - element - - - qualifier - - - imp_record_id - - - metadata_value - - - metadata_order - - - crisid - - - metadata_authority - - - metadata_visibility - - - language - - N - - - - - - - - - - - 1120 - 1648 - Y - - - - Append eperson metadata - Append - - Y - - 1 - - none - - - Append legacy ids - select metadata attributes 2 2 - - - - - - - - - - 1120 - 1536 - Y - - - - Get eperson 2 - DBJoin - - Y - - 1 - - none - - - dspace - 1 - SELECT ep.uuid as metadata_authority, ep.email as metadata_value -FROM eperson ep -WHERE ep.eperson_id = ? - N - Y - - - custompointer - Integer - - - - - - - - - - - - 912 - 1792 - Y - - - - eperson values not null - FilterRows - - Y - - 1 - - none - - - select metadata attributes 2 2 - - - - N - - - N - metadata_value - IS NOT NULL - - - - N - AND - metadata_authority - IS NOT NULL - - - - - - - - - - - - - - - 1120 - 1776 - Y - - - - is eperson - FilterRows - - Y - - 1 - - none - - - Get eperson 2 - - - - N - dtype - = - - - constant - String - eperson - -1 - -1 - N - - - - - - - - - - - - - - 160 - 1792 - Y - - - - select metadata attributes 2 2 - SelectValues - - N - - 1 - - none - - - - - schema - - - element - - - qualifier - - - imp_record_id - - - metadata_value - - - metadata_order - - - crisid - - - metadata_authority - - - metadata_visibility - - - language - - N - - - - - - - - - - - 1120 - 1648 - Y - - - - Append eperson metadata - Append - - Y - - 1 - - none - - - Append legacy ids - select metadata attributes 2 2 - - - - - - - - - - 1120 - 1536 - Y -