mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 23:40:25 +00:00
Comment out schema update code for now
This commit is contained in:
parent
9343d0cd37
commit
655ea6919b
2 changed files with 8 additions and 21 deletions
|
|
@ -21,17 +21,4 @@ module.exports.userSchema = userSchema = {
|
|||
rewardIds: []
|
||||
};
|
||||
|
||||
module.exports.updateSchema = function(model) {
|
||||
var daysOld, uid, userObj, users, _results;
|
||||
users = model.get('users');
|
||||
console.log(_.size(users), 'users.size before');
|
||||
_results = [];
|
||||
for (uid in users) {
|
||||
userObj = users[uid];
|
||||
if (userObj.lastCron == null) {
|
||||
model.del("users." + uid);
|
||||
}
|
||||
_results.push(daysOld = require('./helpers').daysBetween(userObj.lastCron, new Date()));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
module.exports.updateSchema = function(model) {};
|
||||
|
|
|
|||
|
|
@ -11,15 +11,15 @@ module.exports.userSchema = userSchema = {
|
|||
}
|
||||
|
||||
module.exports.updateSchema = (model) ->
|
||||
users = model.get('users')
|
||||
console.log _.size(users), 'users.size before'
|
||||
for uid,userObj of users
|
||||
# remove if they don't have a lastCron (older accounts didn't)
|
||||
unless userObj.lastCron?
|
||||
model.del "users.#{uid}"
|
||||
# users = model.get('users')
|
||||
# console.log _.size(users), 'users.size before'
|
||||
# for uid,userObj of users
|
||||
# # remove if they don't have a lastCron (older accounts didn't)
|
||||
# unless userObj.lastCron?
|
||||
# model.del "users.#{uid}"
|
||||
|
||||
# TODO remove all users who's tasks compare directly to require('./content).defaultTasks
|
||||
# and haven't logged in for a week
|
||||
daysOld = require('./helpers').daysBetween(userObj.lastCron, new Date())
|
||||
# daysOld = require('./helpers').daysBetween(userObj.lastCron, new Date())
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue