dls.setUpgradeStatus( promote as Boolean ) as element(dls.upgradeStatus)
Sets DLS the upgrade status to current or compatibility-mode. Only use this when upgrading a pre-MarkLogic 8 DLS repository.
Parameters | |
---|---|
promote |
Specify fn:true() to use the current behavior,
fn:false() to use compatibility-mode.
|
dls-admin
role is required to run this
function, or the privilege:http://marklogic.com/xdmp/privileges/dls-admin
// To set the upgrade status to Version 7 compatibiltiy mode const dls = require('/MarkLogic/dls'); declareUpdate(); dls.setUpgradeStatus(false); /* <dls:upgrade-status xmlns:dls="http://marklogic.com/xdmp/dls"> <dls:validation-status>compatibility-mode</dls:validation-status> <dls:validation-date>2018-03-14T18:05:48.23616-07:00</dls:validation-date> </dls:upgrade-status> */
// To indicate a successful upgrade or clear compatibility mode const dls = require('/MarkLogic/dls'); declareUpdate(); dls.setUpgradeStatus(true); /* <dls:upgrade-status xmlns:dls="http://marklogic.com/xdmp/dls"> <dls:validation-status>current</dls:validation-status> </dls:upgrade-status> */