mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-21 07:02:32 +02:00
check migration functionality in staging app
This commit is contained in:
+2
-2
@@ -132,7 +132,7 @@ async function PDF(s, r) {
|
||||
: ((a = await axios.get(serverUrl + '/classes/contracts_Users?where=' + m, {
|
||||
headers: {
|
||||
'X-Parse-Application-Id': APPID,
|
||||
'X-Parse-Session-Token': s.headers.sessiontoken,
|
||||
'X-Parse-Master-Key': masterKEY,
|
||||
},
|
||||
})),
|
||||
'contracts_Users')
|
||||
@@ -142,7 +142,7 @@ async function PDF(s, r) {
|
||||
(c = await axios.get(serverUrl + '/classes/contracts_Users?where=' + p, {
|
||||
headers: {
|
||||
'X-Parse-Application-Id': APPID,
|
||||
'X-Parse-Session-Token': s.headers.sessiontoken,
|
||||
'X-Parse-Master-Key': masterKEY,
|
||||
},
|
||||
})).data && 0 < c.data.results.length
|
||||
? ((a = c), 'contracts_Users')
|
||||
|
||||
@@ -32,18 +32,6 @@ exports.up = async Parse => {
|
||||
});
|
||||
|
||||
return schema.update();
|
||||
|
||||
// const config = new Config(process.env.APP_ID, process.env.PARSE_MOUNT);
|
||||
// const schema = await config.database.loadSchema();
|
||||
// await schema.setPermissions('myclass', {
|
||||
// get: { requiresAuthentication: true },
|
||||
// find: { requiresAuthentication: true },
|
||||
// count: { requiresAuthentication: true },
|
||||
// create: { requiresAuthentication: true },
|
||||
// update: { requiresAuthentication: true },
|
||||
// delete: { requiresAuthentication: true },
|
||||
// addField: {},
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -183,24 +183,21 @@ if (!process.env.TESTING) {
|
||||
httpServer.headersTimeout = 100000; // in milliseconds
|
||||
httpServer.listen(port, function () {
|
||||
console.log('parse-server-example running on port ' + port + '.');
|
||||
const migrate = `APPLICATION_ID=${process.env.APP_ID} SERVER_URL=${process.env.SERVER_URL} MASTER_KEY=${process.env.MASTER_KEY} npx parse-dbtool migrate`;
|
||||
|
||||
exec(migrate, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`Error: ${error.message}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (stderr) {
|
||||
console.error(`Error: ${stderr}`);
|
||||
return;
|
||||
}
|
||||
console.log(`Command output: ${stdout}`);
|
||||
});
|
||||
});
|
||||
// This will enable the Live Query real-time server
|
||||
await ParseServer.createLiveQueryServer(httpServer);
|
||||
|
||||
const migrate = `APPLICATION_ID=${process.env.APP_ID} SERVER_URL=${process.env.SERVER_URL} MASTER_KEY=${process.env.MASTER_KEY} npx parse-dbtool migrate`;
|
||||
// 'APPLICATION_ID={legadranaxn} SERVER_URL=http://localhost:8080/app MASTER_KEY=XnAwPDRQQyMr npx parse-dbtool migrate';
|
||||
|
||||
exec(migrate, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`Error: ${error.message}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (stderr) {
|
||||
console.error(`Error: ${stderr}`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Command output: ${stdout}`);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user