Skip to content

Node.js based forum software built for the modern web

Added schema upgrade to delete the tid:lastFeedUpdate key

Micheil Smithcfaa0b37542c
diff --git a/src/upgrade.js b/src/upgrade.js
index 8fa94af00b..332c2844dc 100644
--- a/src/upgrade.js
+++ b/src/upgrade.js
@@ -560,6 +560,25 @@ Upgrade.upgrade = function(callback) {
winston.info('[2014/2/7] Updating category recent replies -- skipped');
next();
}
+ },
+ function(next) {
+ thisSchemaDate = new Date(2014, 1, 9, 20, 50).getTime();
+ if (schemaDate < thisSchemaDate) {
+ updatesMade = true;
+
+ db.delete('tid:lastFeedUpdate', function(err, uids) {
+ if(err) {
+ winston.err('Error upgrading '+ err.message);
+ process.exit();
+ } else {
+ winston.info('[2014/2/9] Remove Topic LastFeedUpdate value, as feeds are now on-demand');
+ next();
+ }
+ });
+ } else {
+ winston.info('[2014/2/9] Remove Topic LastFeedUpdate value, as feeds are now on-demand - skipped');
+ next();
+ }
}
// Add new schema updates here
// IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema IN LINE 17!!!