Hello,
I would like to have some information about how addons are updated in Firefox. I designed an addon which has an important update between version N and N+1. I introduced a piece of code which is executed once only in order to convert old storage data from N to new data in N+1.
//background.js
browser.storage.local.get(function(storage){
if(storage.version<N+1){
/*********** Converting code ***********/
/* browser.storage.local.set({ ... }); */
}
});
Most users updated to version N+1 but some still use version N. Now I want to publish a version N+2 which doesn’t contain the converting code anymore.
[version N] --------------------> [N+1] --------------------> [N+2]
old storage ------------> converting code ---------> new storage
10% users -------------------> 90% users
My questions are :
- Will the 10% users update to N+1 before N+2 ?
- Do I need to keep the converting code in version N+2 and higher ?