|
|
|
@ -21,7 +21,7 @@ var db = require('./database'),
|
|
|
|
|
schemaDate, thisSchemaDate,
|
|
|
|
|
|
|
|
|
|
// IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema
|
|
|
|
|
latestSchema = Date.UTC(2015, 1, 24, 1);
|
|
|
|
|
latestSchema = Date.UTC(2015, 1, 25);
|
|
|
|
|
|
|
|
|
|
Upgrade.check = function(callback) {
|
|
|
|
|
db.get('schemaDate', function(err, value) {
|
|
|
|
@ -941,6 +941,25 @@ Upgrade.upgrade = function(callback) {
|
|
|
|
|
winston.info('[2015/02/24] Upgrading privilege groups to system groups skipped');
|
|
|
|
|
next();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
function(next) {
|
|
|
|
|
thisSchemaDate = Date.UTC(2015, 1, 25);
|
|
|
|
|
if (schemaDate < thisSchemaDate) {
|
|
|
|
|
updatesMade = true;
|
|
|
|
|
winston.info('[2015/02/25] Upgrading menu items to dynamic navigation system');
|
|
|
|
|
|
|
|
|
|
require('./navigation/admin').save(require('../install/data/navigation.json'), function(err) {
|
|
|
|
|
if (err) {
|
|
|
|
|
return next(err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
winston.info('[2015/02/25] Upgrading menu items to dynamic navigation system done');
|
|
|
|
|
Upgrade.update(thisSchemaDate, next);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
winston.info('[2015/02/25] Upgrading menu items to dynamic navigation system skipped');
|
|
|
|
|
next();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add new schema updates here
|
|
|
|
|