From bf5526103a163f995571804e507a92a2426ce5c6 Mon Sep 17 00:00:00 2001 From: gkolokythas Date: Mon, 13 Jan 2020 12:17:06 +0200 Subject: [PATCH] SQL scripts for updating "Reference" on Funder, Grant and Project to now use the "dmp:" prefix and their unique id as part of it. --- ...er_Grant_Project_References_For_Internal_Items.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 dmp-db-scema/updates/06/02_Update_Funder_Grant_Project_References_For_Internal_Items.sql diff --git a/dmp-db-scema/updates/06/02_Update_Funder_Grant_Project_References_For_Internal_Items.sql b/dmp-db-scema/updates/06/02_Update_Funder_Grant_Project_References_For_Internal_Items.sql new file mode 100644 index 000000000..6fe80768b --- /dev/null +++ b/dmp-db-scema/updates/06/02_Update_Funder_Grant_Project_References_For_Internal_Items.sql @@ -0,0 +1,11 @@ +UPDATE "Funder" +SET "Reference" = CONCAT('dmp:', "ID") +WHERE "Reference" LIKE 'dmp:%'; + +UPDATE "Grant" +SET "Reference" = CONCAT('dmp:', "ID") +WHERE "Reference" LIKE 'dmp:%'; + +UPDATE "Project" +SET "Reference" = CONCAT('dmp:', "ID") +WHERE "Reference" LIKE 'dmp:%'; \ No newline at end of file