Commit 5ae39f94 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

migration: made update of pre-existing storage classes consistent to the...

migration: made update of pre-existing storage classes consistent to the update of tape pools, that is take the latest CASTOR metadata as valid
parent 3d372c82
......@@ -200,7 +200,15 @@ BEGIN
'CASTOR', 'CASTOR', CNS_getTime()
);
EXCEPTION WHEN CONSTRAINT_VIOLATED THEN
NULL; -- it was already present, skip ASSUMING it's the correct one!
UPDATE Storage_Class SET -- it is already present, update it with the current values
disk_instance_name = inEOSCTAInstance,
storage_class_name = c.classname,
nb_copies = c.nbcopies,
user_comment = 'Re-imported from CASTOR',
last_update_user_name = 'CASTOR',
last_update_host_name = 'CASTOR',
last_update_time = CNS_getTime()
WHERE storage_class_id = c.classid;
END;
END LOOP;
COMMIT;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment