diff --git a/src/upgrade.js b/src/upgrade.js index 587bf72623..3e8d5f1b97 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -19,7 +19,7 @@ var db = require('./database'), Upgrade.check = function(callback) { // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema - var latestSchema = new Date(2014, 1, 20, 19, 45).getTime(); + var latestSchema = new Date(2014, 1, 20, 20, 20).getTime(); db.get('schemaDate', function(err, value) { if (parseInt(value, 10) >= latestSchema) { @@ -796,6 +796,21 @@ Upgrade.upgrade = function(callback) { winston.info('[2014/2/20] Updating Lavender MOTD - skipped'); next(); } + }, + function(next) { + thisSchemaDate = new Date(2014, 1, 20, 20, 20).getTime(); + + if (schemaDate < thisSchemaDate) { + updatesMade = true; + + db.setAdd('plugins:active', 'nodebb-widget-essentials', function(err) { + winston.info('[2014/2/20] Activating NodeBB Essential Widgets'); + next(err); + }); + } else { + winston.info('[2014/2/20] Activating NodeBB Essential Widgets - skipped'); + next(); + } } // Add new schema updates here // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema IN LINE 17!!!