merge recent upgrade changes from 2.4 branch
Add in Darwin Core schema support into xml_catalog, and insert it on upgrade as well. The schemas are cached in lib/schema/dwc, and Matt and Ben noted that the tdwg_basetypes.xsd and tdwg_dwctypes.xsd are part of the same namespace, but are xs:include'd rather than imported via namespace.
Add DataONE, Dublin Core, and Dryad schemas during the 2.4.0 upgrade, and be sure to remove the appropriate entries before inserting to avoid duplicate rows.
do not include "sm" alias in the SET clause.
comment out the select statements so they do not run during real upgrade.
loosen the restriction on which archive flags we set to false -- if we have an obsoleted_by value then it need not be marked as archived.
adjust whitespace for consistency
restrict the archived=false update to revisions that still have current entries in the xml_documents table.
tested the restore insertions - adjusted for FK constraints. I was able to delete a document locally, then restore it, then update the document with a new revision as expected.
use 'with' query to find the most recent revision of an object that was archived. still want more feedback on the criteria.
continue to work on the criteria for selecting documents to restore.expanded the criteria for setting archived=false to include any revision that was already obsoleted_by somethign else.
correct syntax - add more criteria for selecting documents.
draft of fix for erroneously archived documents - first discovered by LTER - but also applicable to other Metacat MNs that still use the Metacat API as of Jan 2014 CN changes.
use v2.4.0 for documentation and upgrade scripts.