treojs / treo

Consistent API to IndexedDB
http://treojs.com
MIT License
258 stars 18 forks source link

Question: How to correctly manage structure changes #46

Closed localnerve closed 8 years ago

localnerve commented 8 years ago

This isn't really a treo issue or question, per se, more an IndexedDB question from a noob.

What is the proper way to handle structure changes?

For example, new objectStores are only added in schema.callback (onupgradeneeded), which does not fire by just simply adding a new store via schema.addStore.

The MDN docs suggests that you just bump the version to trigger the event.

Is that what treo expects a user to do? Then what about the old version? must drop it? How does version growth get managed?

Thanks for taking the time to read my question. I apologize if this is inappropriate.

localnerve commented 8 years ago

After reading MDN more, I get it.