SQL script for "reference" property update of all Dataset Description "External References" (Data Repository, External Dataset, Registry, Service). (Issue #187)
This commit is contained in:
parent
276c7d6719
commit
b0babe906c
|
@ -0,0 +1,31 @@
|
|||
-- 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/%'
|
Loading…
Reference in New Issue