argos/dmp-db-scema/updates/05/External_References_Referen...

31 lines
1.0 KiB
SQL

-- Registry Update Script
UPDATE public."Registry"
SET "Reference" = REPLACE("Reference", 'dmpdata/', 'dmp:')
WHERE "Reference" LIKE 'dmpdata/%';
-- Service Update Script
UPDATE public."Service"
SET "Reference" = REPLACE("Reference", 'dmpdata/', 'dmp:')
WHERE "Reference" LIKE 'dmpdata/%';
UPDATE public."Service"
SET "Reference" = REPLACE("Reference", 'innerdata/', 'dmp:')
WHERE "Reference" LIKE 'innerdata/%';
-- DataRepository
UPDATE public."DataRepository"
SET "Reference" = REPLACE("Reference", 'dmpdata/', 'dmp:')
where "Reference" like 'dmpdata/%';
UPDATE public."DataRepository"
SET "Reference" = CONCAT('re3data:', "Reference")
where "Reference" LIKE '%:re3data%';
UPDATE public."DataRepository"
SET "Reference" = CONCAT('dmp:', "Reference")
where "Reference" LIKE '%:internal%';
UPDATE public."DataRepository"
SET "Reference" = CONCAT('eestore:', "Reference")
where "Reference" LIKE '%:eestore%';
-- ExternalDataset
UPDATE public."ExternalDataset"
SET "Reference" = REPLACE("Reference", 'dmpdata/', 'dmp:')
WHERE "Reference" LIKE 'dmpdata/%';