Loading TOC...

MarkLogic Server 11.0 Product Documentation
dls.setUpgradeStatus

dls.setUpgradeStatus(
   promote as Boolean
) as element(dls.upgradeStatus)

Summary

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.

Required Privileges

The dls-admin role is required to run this function, or the privilege:
http://marklogic.com/xdmp/privileges/dls-admin

Example

// 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>
*/
   

Example

// 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>
*/
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.