angular-indexedDB icon indicating copy to clipboard operation
angular-indexedDB copied to clipboard

Upgrade function ordering

Open lisaslyis opened this issue 9 years ago • 1 comments

upgradeDB function stores the upgrade callback functions with its version number as a key in javascript associative arrays.

But the ordering of key is not guaranteed to be preserved in javascript. (I'm not sure if the ordering is preserved in all browsers although it is not in javascript specification) so there is a possibility to apply modification to db in wrong order.

eg. create object-storeA in version1 and delete object-storeA in version2. (these should not be applied in reverse order)

lisaslyis avatar Apr 08 '16 11:04 lisaslyis

Can you repro? This should be easy to fix.

bramski avatar Oct 26 '16 04:10 bramski