Merge pull request #640 from akhoury/master

issue#635
This commit is contained in:
Barış Soner Uşaklı
2013-12-08 12:26:24 -08:00
2 changed files with 17 additions and 1 deletions

3
.gitignore vendored
View File

@@ -16,3 +16,6 @@ provision.sh
*.komodoproject
feeds/recent.rss
# winston?
error.log

View File

@@ -236,7 +236,7 @@ Upgrade.upgradeRedis = function(callback) {
}
if(value === null) {
RDB.hset('global', newKeys[key], 0, next);
RDB.hset('global', newKeys[key], initialValues[key], next);
} else {
RDB.hset('global', newKeys[key], value, next);
}
@@ -272,6 +272,19 @@ Upgrade.upgradeRedis = function(callback) {
'totalpostcount':'postCount'
};
var initialValues = {
'global:next_user_id': 1,
'next_topic_id': 0,
'next_gid': 1,
'notifications:next_nid': 0,
'global:next_category_id': 12,
'global:next_message_id': 0,
'global:next_post_id': 0,
'usercount': 1,
'totaltopiccount': 0,
'totalpostcount': 0
};
async.each(keys, updateKeyToHash, function(err) {
if(err) {
return next(err);