Revision 7327
Added by ben leinfelder over 12 years ago
doi_registration.sql | ||
---|---|---|
394 | 394 |
set objectFormat = doc.doctype |
395 | 395 |
from identifier id, xml_documents doc |
396 | 396 |
where doi.guid = id.guid |
397 |
and id.docid = doc.docid; |
|
397 |
and id.docid = doc.docid |
|
398 |
and id.rev = doc.rev; |
|
398 | 399 |
|
399 | 400 |
-- update the objectFormat from xml_revisions |
400 | 401 |
update doi_registration doi |
401 | 402 |
set objectFormat = rev.doctype |
402 | 403 |
from identifier id, xml_revisions rev |
403 | 404 |
where doi.guid = id.guid |
404 |
and id.docid = rev.docid; |
|
405 |
and id.docid = rev.docid |
|
406 |
and id.rev = rev.rev; |
|
405 | 407 |
|
406 | 408 |
--update resourceType |
407 | 409 |
update doi_registration |
... | ... | |
458 | 460 |
set resourceMapId = 'resourceMap_'||id.docid||'.'||id.rev |
459 | 461 |
from identifier id |
460 | 462 |
where doi.guid = id.guid |
461 |
and id.docid = rev.docid |
|
462 | 463 |
and objectFormat like 'eml%'; |
463 | 464 |
|
464 | 465 |
--update the resourcemapid for described data |
Also available in: Unified diff
correctly use document revision for object format and resource map joins.