diff --git a/js/database.js b/js/database.js index d6a52aa5..6298a628 100644 --- a/js/database.js +++ b/js/database.js @@ -68,6 +68,18 @@ storage.put('unreadCount', unreadCount); }); } + }, + { + version: "4.0", + migrate: function(transaction, next) { + var all = new Whisper.ConversationCollection(); + all.fetch().then(function() { + all.each(function(c) { + c.updateTokens(); + c.save(); + }); + }); + } } ]; }());