From 972ae42d913dcc0687c327a2142c18ee067e085a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 20 May 2015 11:44:10 -0400 Subject: [PATCH] pruned upgrade scripts in preparation for 0.7.0, ping @barisusakli --- src/upgrade.js | 753 +------------------------------------------------ 1 file changed, 1 insertion(+), 752 deletions(-) diff --git a/src/upgrade.js b/src/upgrade.js index 47fd8badc0..d41c963a73 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -17,7 +17,7 @@ var db = require('./database'), Upgrade = {}, - minSchemaDate = Date.UTC(2014, 9, 22), // This value gets updated every new MINOR version + minSchemaDate = Date.UTC(2015, 1, 8), // This value gets updated every new MINOR version schemaDate, thisSchemaDate, // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema @@ -72,757 +72,6 @@ Upgrade.upgrade = function(callback) { } }); }, - function(next) { - thisSchemaDate = Date.UTC(2014, 9, 31); - if (schemaDate < thisSchemaDate) { - updatesMade = true; - winston.info('[2014/10/31] Applying newbiePostDelay values'); - - async.series([ - async.apply(Meta.configs.setOnEmpty, 'newbiePostDelay', '120'), - async.apply(Meta.configs.setOnEmpty, 'newbiePostDelayThreshold', '3') - ], function(err) { - if (err) { - winston.error('[2014/10/31] Error encountered while Applying newbiePostDelay values'); - return next(err); - } - winston.info('[2014/10/31] Applying newbiePostDelay values done'); - Upgrade.update(thisSchemaDate, next); - }); - } else { - winston.info('[2014/10/31] Applying newbiePostDelay values skipped'); - next(); - } - }, - function(next) { - thisSchemaDate = Date.UTC(2014, 10, 6, 18, 30); - if (schemaDate < thisSchemaDate) { - updatesMade = true; - winston.info('[2014/11/6] Updating topic authorship sorted set'); - - async.waterfall([ - async.apply(db.getObjectField, 'global', 'nextTid'), - function(nextTid, next) { - var tids = []; - for(var x=1,numTids=nextTid-1;x