add migration script for update menu & add IsArchive field in document cls

This commit is contained in:
prafull-opensignlabs
2024-01-10 12:21:00 +05:30
parent 9a3b70de43
commit 9cb0ced4f6
4 changed files with 54 additions and 13 deletions
@@ -59,7 +59,7 @@ exports.up = async Parse => {
},
{
icon: 'fas fa-folder',
title: 'OpenSignDrive',
title: 'OpenSignDrive',
target: '_self',
pageType: 'mf',
description: '',
@@ -206,6 +206,15 @@ exports.up = async Parse => {
description: '',
objectId: '6TeaPr321t',
},
{
icon: 'fas fa-folder',
title: 'OpenSign™ Drive',
target: '_self',
pageType: 'mf',
description: '',
objectId:
'remoteUrl=aHR0cHM6Ly9xaWstYWktb3JnLmdpdGh1Yi5pby9TaWduLU1pY3JvYXBwVjIvcmVtb3RlRW50cnkuanM=&moduleToLoad=AppRoutes&remoteName=signmicroapp/legadrive',
},
{
icon: 'fas fa-address-card',
title: 'Reports',
@@ -576,4 +585,4 @@ exports.down = async Parse => {
// schema.addString('name').addNumber('cash');
const batch = [revertUserMenu, revertAdminMenu];
return Parse.Object.saveAll(batch, { useMasterKey: true });
};
};
@@ -0,0 +1,23 @@
/**
*
* @param {Parse} Parse
*/
exports.up = async Parse => {
// TODO: set className here
const className = 'contracts_Document';
const schema = new Parse.Schema(className);
schema.addBoolean('IsArchive');
return schema.update();
};
/**
*
* @param {Parse} Parse
*/
exports.down = async Parse => {
// TODO: set className here
const className = 'contracts_Document';
const schema = new Parse.Schema(className);
schema.deleteField('IsArchive');
return schema.update();
};