From 3309cc4d2d94183e91f826d8f03169a5621419ca Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Tue, 30 Jan 2024 18:10:08 +0100 Subject: [PATCH] [DSC-1448] Fix sql query --- .../rdbms/sqlmigration/h2/V8.0_2024.01.02__migrate-nbevents.sql | 2 +- .../sqlmigration/postgres/V8.0_2024.01.02__migrate-nbevents.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V8.0_2024.01.02__migrate-nbevents.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V8.0_2024.01.02__migrate-nbevents.sql index 49cb5cd47993..4c21cd3bd11f 100644 --- a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V8.0_2024.01.02__migrate-nbevents.sql +++ b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V8.0_2024.01.02__migrate-nbevents.sql @@ -9,7 +9,7 @@ -- -- -- Copy raws from nbevent_processed table to qaevent_processed table -- -- -INSERT INTO qaevent_processed as qa (qaevent_id, qaevent_timestamp, eperson_uuid, item_uuid) +INSERT INTO qaevent_processed (qaevent_id, qaevent_timestamp, eperson_uuid, item_uuid) SELECT nbevent_id, nbevent_timestamp, eperson_uuid, item_uuid UUID FROM nbevent_processed as nb WHERE NOT EXISTS( SELECT * FROM qaevent_processed as qa WHERE qa.qaevent_id = nb.nbevent_id diff --git a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V8.0_2024.01.02__migrate-nbevents.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V8.0_2024.01.02__migrate-nbevents.sql index 49cb5cd47993..4c21cd3bd11f 100644 --- a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V8.0_2024.01.02__migrate-nbevents.sql +++ b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V8.0_2024.01.02__migrate-nbevents.sql @@ -9,7 +9,7 @@ -- -- -- Copy raws from nbevent_processed table to qaevent_processed table -- -- -INSERT INTO qaevent_processed as qa (qaevent_id, qaevent_timestamp, eperson_uuid, item_uuid) +INSERT INTO qaevent_processed (qaevent_id, qaevent_timestamp, eperson_uuid, item_uuid) SELECT nbevent_id, nbevent_timestamp, eperson_uuid, item_uuid UUID FROM nbevent_processed as nb WHERE NOT EXISTS( SELECT * FROM qaevent_processed as qa WHERE qa.qaevent_id = nb.nbevent_id